用idea运行SSM时无法绑定Mapper.xml( Invalid bound statement (not found))
来源:互联网 发布:2014年中国进出口数据 编辑:程序博客网 时间:2024/06/08 17:42
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
照着视频打代码, 却发现无法运行,视频里用的是eclipse,我用的是idea, 经过研究是idea与eclipse的不同, 试了好多篇文章发现只有这一篇的解法能解决:
http://www.cnblogs.com/aioria13/p/6224489.html
原因: 部署后target里面没有mybatis的配置文件*.xml
解决方法:在pom.xml中通过maven强制将*.xml文件一起发布
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<
build
>
<
plugins
>
<
plugin
>
<
groupId
>org.apache.maven.plugins</
groupId
>
<
artifactId
>maven-compiler-plugin</
artifactId
>
<
configuration
>
<
source
>1.8</
source
>
<
target
>1.8</
target
>
</
configuration
>
</
plugin
>
</
plugins
>
<
resources
>
<
resource
>
<
directory
>src/main/java</
directory
>
<
includes
>
<
include
>**/*.properties</
include
>
<
include
>**/*.xml</
include
>
</
includes
>
<
filtering
>false</
filtering
>
</
resource
>
</
resources
>
</
build
>
阅读全文
0 0
- 用idea运行SSM时无法绑定Mapper.xml( Invalid bound statement (not found))
- ssm出现Invalid bound statement (not found):
- invalid bound statement (not found),大概应该是报mapper.xml中的sql查询和mapper.java中的方法没有绑定成功!
- ssm中Invalid bound statement (not found)错误的处理(IDEA中)
- Eclipse中Mybatis无法读取xml文件的问题(mybatis绑定错误-- Invalid bound statement (not found))
- Invalid bound statement (not found): cn.e3mall.mapper.TbItemMapper.selectByExample
- Invalid bound statement (not found):
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- Invalid bound statement (not found)
- invalid bound statement (not found)
- Java *.properties 用法
- iOS锁屏踩坑记
- Data mining基础之认识数据(2)
- 深入理解计算机操作系统(2.2.7)
- Hibernate--增删改查
- 用idea运行SSM时无法绑定Mapper.xml( Invalid bound statement (not found))
- 练习16
- oracal存储过程与存储函数
- 【C++】POJ 刷题指南
- 三角剖分算法
- android FragMent使用笔记
- 给Android Studio代码编辑器设置背景图片
- java内存管理与继承
- mysql group_concat 的分组,以及输出到Java的String