【异常】Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
来源:互联网 发布:java sleep使用 编辑:程序博客网 时间:2024/05/16 13:48
将项目打包后发布到服务器上,结果运行后报异常:
Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
com.tisson.omp.quartz.ngcc1.dao.Ngcc1Dao.findAllAccess
说明扫描到了我的DAO接口,但无法注入Mapper或者说注入了null的Mapper。然而我把平常易错的地方都从新检查了一遍后任然没有发现错误的地方,但一直报这个异常。最后发现是在打包时maven没有把我的Mapper.xml文件一起打包进去,因为放的位置是在scr/main/java下而不是src/main/resources,所以maven默认是不帮我一起打包的需要自己手动配置pom来打包。然后重新配置pom后再打包,就把Mapper文件打包进去了。
在<build>标签中加入以下内容,即可将xml等文件打包在原路径下:
<resources><resource><directory>src/main/resources</directory><includes><include>**/*.properties</include><include>**/*.xml</include><include>**/*.tld</include></includes><filtering>false</filtering><!--这里是false,用true会报 数据库连接 错误--></resource><resource><directory>src/main/java</directory><includes><include>**/*.properties</include><include>**/*.xml</include><include>**/*.tld</include></includes><filtering>false</filtering></resource></resources>
阅读全文
0 0
- 【异常】Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- Oracle 创建视图、创建存储过程
- 小甲鱼PE详解之输入表(导出表)详解(PE详解09)
- C# Async/Await异步函数原理
- OSG学习:LOD、数据分页、动态调度
- 优化网页速度的7种方法
- 【异常】Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- JS学习(12)----events
- codeforces 816D Karen and Test(数学)
- C++精进篇继承及经典示例
- 如何把字符串写入SD卡文件中,如何读取SD卡文件的数据
- SparkSQL 操作 Json 格式数据
- 非阻塞同步算法与CAS(Compare and Swap)无锁算法
- Spring:IoC 用法(九、@Bean 用法)
- ACM基础题:阶乘因式分解(一)