MySQLNonTransientConnectionException: No operations allowed after statement closed hibernate
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQLNonTransientConnectionException: No operations allowed after statement closed hibernate相关的知识,希望对你有一定的参考价值。
第一种是在DB连接字符串后面加一个参数。
这样的话,如果当前链接因为超时断掉了,那么驱动程序会自动重新连接数据库。
jdbc:mysql://localhost:3306/makhtutat?autoReconnect=true
现在的问题就是出在autoReconnect=true,改成false后,问题解决。
以上是关于MySQLNonTransientConnectionException: No operations allowed after statement closed hibernate的主要内容,如果未能解决你的问题,请参考以下文章