MyBatis XML配置tips
作者:互联网
<mapper namespace="com.itheima.springbootmybatis.mapper.UserXmlMapper"> //namespace写到类
<select id="getList" resultType="user">
select * from t_user
</select>
</mapper>
mybatis:
mapper-locations: classpath:mapper/*Mapper.xml
type-aliases-package: com.itheima.springbootmybatis.domain //type-aliases-package写到包
标签:XML,mapper,domain,package,MyBatis,tips,type,aliases 来源: https://www.cnblogs.com/hippoppower/p/14951835.html