springboot+mybatis+gradle

时间:2026-02-12 16:22:21

1、查找对应的xml,mapper,entity对应的配置和名称是否相符

:名称不符时会报BindingException异常

2、查找application.properties中的mybatis配置。

eg:

# 配置文件位置mybatis.config-location=classpath:config/myBatisConfig.xml#实体类包mybatis.typeAliasesPackage=com.news.model#mapper文件位置mybatis.mapper-locations=classpath:mapper/*.xml

3、当前遇到的就这两种情况,如后面预计其它情况,再进行添加

© 2026 途途旅游
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com