公司新搭建的项目 再idea中进行springboot集成mybatis时项目能正常启动,但在链接数据库时提示nvalid bound statement (not found)

或者是没在mapper接口中添加@Mapper注解,我一一排查后发现都不是。最后在一片博文里看到了解决方案

解决方案:

1.排查spring boot的主配置文件里面有没有配置加载mybatis的配置

mybatis.typeAliasesPackage=com.zpark.dao
mybatis.mapperLocations=classpath:mapper/*.xml

2.查看mybatis中的mapper.xml文件里面的  dao层类名和实体类名和配置文件的是否一致,dao层有没有添加@Mapper注解

相关文章:

  • 2021-11-22
  • 2022-01-03
  • 2021-08-26
  • 2021-11-03
  • 2022-12-23
  • 2021-04-15
  • 2021-10-17
  • 2021-09-30
猜你喜欢
  • 2021-12-26
  • 2021-10-30
  • 2021-05-17
  • 2021-05-03
  • 2021-04-13
  • 2021-07-03
  • 2022-12-23
相关资源
相似解决方案