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

 

上一篇:一文搞明白 Domain Borrowing


下一篇:跨域