org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常解决
来源:互联网 发布:filereader读取文件php 编辑:程序博客网 时间:2024/06/10 23:13
我要说说除了检查 namesapce,resultType等以外的
在我们的项目中,有一个地方是用来配置xml文件扫描规则的:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mapperLocations" value="classpath:mapper/*.xml"/> <property name="configLocation" value="classpath:/mybatis-config.xml"/> </bean>
注意mapperLocations那一行
如果你的项目是在一个model下面,打成war包,就用这个
如果你的项目不是在一个model下面,xml分散在不同的model中,已jar包的形式依赖的,就要换一种方式,要不然用上面的方式只会加载一个jar包的xml
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <!--<property name="mapperLocations" value="classpath:mapper/*.xml"/>--> <!--war包用这个--> <property name="mapperLocations" value="classpath*:mapper/*.xml"/><!--jar包用这个--> <property name="configLocation" value="classpath:/mybatis-config.xml"/> </bean>
希望可以帮到大家
阅读全文
0 0
- 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)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- 线程安全与可重入
- Qt5.8 QDialog设置最小化跟关闭按钮
- Openv学习笔记--常用函数(转自互联网)
- 超线程技术
- Hibernate中的merge使用详情解说
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)异常解决
- MFC中去掉窗口右上角的关闭按钮
- webView
- table.column 或列说明无效
- Java实现-最长公共子序列
- MonkeyEye电影售票系统--前端项目结构和协作规范
- Kotlin中的static
- redis面试总结
- STM32从Flash地址0x08000000的启动重映射