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写到包

 

MyBatis XML配置tips

上一篇:nginx大神之路必备之nginx_proxy模块


下一篇:鼠标\表单\触摸事件