当前位置: 代码迷 >> 综合 >> springboot工程未知道mapper.xml文件位置路径,启动工程不报错,调用接口时报错Invalid bound statement (not found):
  详细解决方案

springboot工程未知道mapper.xml文件位置路径,启动工程不报错,调用接口时报错Invalid bound statement (not found):

热度:97   发布时间:2023-09-19 19:08:07.0

2021-06-11 09:23:44,562 ERROR [http-nio-9102-exec-1] WebMvcConfigurer: 接口 [/rest/col/fieldList] 出现异常,方法:com.p.data.md.rest.ColRestController$$EnhancerBySpringCGLIB$$dace1a5f.listByTabIdOrViewId,异常摘要:Invalid bound statement (not found): com.p.data.md.dao.MetaTablesGatherDao.findMetaTablesGatherList
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.p.data.md.dao.MetaTablesGatherDao.findMetaTablesGatherList

解决办法:

在application.properties中添加

mybatis.mapper-locations=classpath:mapper/*.xml

或者:

mybatis.mapperLocations=classpath:mapper/*.xml

  相关解决方案