1.mybatis.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration SYSTEM "http://mybatis.org/dtd/mybatis-3-config.dtd" PUBLIC "-//mybatis.org//DTD Config 3.0//EN">
-<configuration>
<!--spring处理 mybatis 数据源-->
<!--日志-->
-<settings>
<setting value="STDOUT_LOGGING" name="logImpl"/>
</settings>
<!--别名-->
-<typeAliases>
<package name=""/>
</typeAliases>
<!--绑定注册-->
-<mappers>
<mapper resource=""/>
</mappers>
</configuration>
2.XXXmapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper SYSTEM "http://mybatis.org/dtd/mybatis-3-mapper.dtd" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN">
<!--绑定mapper-->
-<mapper namespace="">
<!--增-->
<!--删-->
<!--改-->
<!--根据id查询-->
<!--全查-->
</mapper>