整合spring与MyBatis时出现如下警告:
[org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:360)]-[WARN] Invocation of destroy method 'close' failed on bean with name 'sqlSession': java.lang.UnsupportedOperationException: Manual close is not allowed over a Spring managed SqlSession
网上搜了一下,要去掉警告要在org.mybatis.spring.SqlSessionTemplate上加上
scope="prototype"
最终结果如下:
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate" scope="prototype">
<constructor-arg ref="sqlSessionFactory" />
</bean>
备注:scope="prototype"慎用,你明白的!
分享到:
相关推荐
设置隐试打开PPT报错 Hiding the application window is not allowed
Host 主机名 is not allowed to connect the mysql server 原因:没有授权远程访问mysql 解决方法: cmd 中运行mysql -u root -p(如果报mysql 不是内部或外部命令,找到安装mysql对应的bin文件夹运行mysql.exe,...
"Host 'localhost' is not allowed to connect to this MySQL server" 的原因及解决办法
nginx: [emerg] “proxy_cache_path” directive is not allowed here in /etc/nginx/conf.d/default.conf:29 提示意思“proxy_cache_path指令不被允许”,在官网上查找了相关说明,也没有发现问题,最后看应用范围...
主要介绍了php采用curl访问域名返回405 method not allowed提示的解决方法,需要的朋友可以参考下
NULL 博文链接:https://rayoo.iteye.com/blog/1973032
Android WebView 报 Not allowed to load local resource错误的解决办法 博客地址:http://blog.csdn.net/yuzhiqiang_1993/article/details/76228541
NR5G网络拒绝码-5gmm_cause = 7 (0x7) (5GS Service not allowed)
message from server: “Host ‘****’ is not allowed to connect to this MySQL server 1:在登录mysql服务器 2:执行:GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION //赋予任何主机访问数据的...
NULL 博文链接:https://yizhilong28.iteye.com/blog/1137285
keil常见错误 keil常见错误 keil常见错误 keil常见错误
主要介绍了Intellij IDEA实现springboot热部署过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
mongod高级查询语句,Javascript查询和$where查询,正则表达式匹配
从3GPP协议和UE端行为分析5G gmm cause #27的网络问题
ERROR 1130 (HY000): Host ‘localhost’ is not allowed to connect to this MySQL server www.jb51.net 出现原因: mysql只有一个root用户,修改root密码后选了MD5,提交后,重新 登陆出现“Host ‘localhost’ is...
java.sql.SQLException: null, message from server: “Host ‘223.72.41.7’ is not allowed to connect to this MySQL server” 客户端访问时报错: 解决方法: 1,登陆服务器 mysql> use mysql; //用mysql ...
keil 编译时出现错误和警告总结 中国电子DIY之家
如果你想连接你的mysql的时候发生这个错误: 代码如下: ERROR 1130: Host ‘192.168.1.3’ is not allowed to connect to this MySQL server 解决方法: 1。 改表法。可能是你的帐号不允许从远程登陆,只能在...
opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a storage class is not allowed in an explicit specialization 这是由于NCVPixelOperations.hpp的问题,只要替换opencv-2.4.9/...
Error:(25, 5) Integer types not allowed (at 'android:textSize' with value '12'). 代码 <style name=HorizontalBtnLayout> <item name=android:layout_height>match_parent ...