Spring @Transactional not creating required transaction

后端 未结 3 1287
悲&欢浪女
悲&欢浪女 2021-02-07 11:59

Ok, so I\'ve finally bowed to peer pressure and started using Spring in my web app :-)...

So I\'m trying to get the transaction handling stuff to work, and I just can\'t

3条回答
  •  独厮守ぢ
    2021-02-07 12:28

    In my case:

    Using JPA with Spring MVC - all of my tests and code ran fine without error - symptom was that commits would simply not save to the database no matter what I tried.

    I had to add to my applicationContext.xml and cglib-nodep-2.1_3.jar aopalliance-1.0.jar

    Definitely the fix in my case. Without annotation-driven Spring will not scan for the @Transactional annotation

提交回复
热议问题