主要配置這倆mybatis
1.實體類別名(用於mapper.xml)app
2.mapper.xml所在路徑spa
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!-- 控制檯打印查詢語句,不是本身建立的 --> <settings> <setting name="logImpl" value="STDOUT_LOGGING" /> </settings> <!-- 類型別名,做用:起別名 --> <typeAliases> <typeAlias alias="AdminModel" type="cn.kihyou.b2c.admin.model.AdminModel" /> <typeAlias alias="LoginInfoModel" type="cn.kihyou.b2c.login.model.LoginInfoModel" /> <typeAlias alias="LoginInfoModel" type="cn.kihyou.b2c.login.model.LoginInfoModel" /> </typeAliases> <!-- 配置全部的mapper --> <mappers> <mapper resource="cn/kihyou/b2c/admin/mapper/AdminMapper.xml" /> <mapper resource="cn/kihyou/b2c/login/mapper/LoginMapper.xml" /> <mapper resource="cn/kihyou/b2c/reg/mapper/RegistMapper.xml" /> </mappers> </configuration>