解决Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionExcep
在applicationContext.xml中,大概是用键的方法获得jdbc.jdbUrl
而用值表示可以看到“&”下方有红色波浪线,即代码检查不能通过
所以去掉“?”之后的代码,即:
jdbc:mysql://localhost:3306/idea
在db.properties中使用
jdbc:mysql://localhost:3306/idea?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
然后
。。。
然后,重启Tomcat,解决了。
历程:一天时间解决这个问题,太惨了,网上找了n个教程,更改了spring版本,然后不知道又干了啥,又回到了原点,还是这个错误。然后,实在没办法了,突然看着看着就想到了这个办法,自学idea使用ssh真难啊。。。