其他分享
首页 > 其他分享> > MyBatis XML配置tips

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