异常处理Manual close is not allowed over a Spring managed SqlSession
来源:互联网 发布:电脑txt小说编辑软件 编辑:程序博客网 时间:2024/04/30 13:40
在SpringMVC 配合Mybatis的使用中出现这样一个警告
[org.springframework.beans.factory.support.DisposableBeanAdapter (line-337)] - Invocation of destroy method ‘close’ failed on bean with name ‘sqlSession’: java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
解决办法:在Spring MVC的配置文件中加入
<bean id="writableSQLSession" class="org.mybatis.spring.SqlSessionTemplate" scope="prototype"> <constructor-arg index="0" ref="sqlSessionFactory"/> </bean>
重点是加上scope
0 0
- 异常处理Manual close is not allowed over a Spring managed SqlSession
- Spring-MyBatis实战之 Manual close is not allowed over a Spring managed SqlSession
- Manual commit is not allowed over a Spring managed SqlSession
- JUnit测试时,Mybatis报错:Manual close is not allowed over a Spring managed SqlSessio
- Manual commit is not allowed over a Spring managed
- loadrunner异常处理:fopen is not allowed
- iOS 【错误:'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'】
- spring boot jpa-java.lang.IllegalArgumentException: Not a managed type异常问题解决方法
- Content is not allowed in prolog异常产生原因及处理方式
- Content is not allowed in prolog异常产生原因及处理方式
- 异常信息:Content is not allowed in trailing section
- Space is not allowed after parameter prefix ':' MySQL异常
- Space is not allowed after parameter prefix ':' MySQL异常
- 异常 1130 host is not allowed to connect to
- scrapy异常:http status code is not handled or allowed
- Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)异常解决方法
- SpringMVC:Write operations are not allowed in read-only mode (FlushMode.MANUAL)异常
- weblogic对xml中BOM处理异常——org.xml.sax.SAXParseException:Content is not allowed in prolog
- Delphi 编写DLL动态链接库文件的知识和样例
- Eclipse一直building workspace问题解决
- 十一.Shell编程之运算符
- 信管 操作系统
- SQL---用一张表中的一列更新另一张表中的一列
- 异常处理Manual close is not allowed over a Spring managed SqlSession
- HttpClient模拟get,post请求并发送请求参数(json等)
- vs2008下win32 dll封装笔记
- Delphi 编写ActiveX控件(OCX控件)的知识和样例
- Unity相机参数详解,easy point ,just Incase of forget
- java 串口通信
- caffe学习笔记3.3--Loss
- linux下安装Redis
- android studio 中导入 已经建好的aidl