No rollback on transaction - Spring Boot 2.0

前端 未结 1 848
天命终不由人
天命终不由人 2021-01-06 11:20

I have a problem with Spring Boot 2.0.0. When I throw an RuntimeException it is not rollback the transaction. I was using Spring Boot 1.5.9 with the same settings and it wor

相关标签:
1条回答
  • 2021-01-06 11:44

    Which dialect are you using? You must be specifying spring.jpa.properties.hibernate.dialect

    Springboot 2.0 @Transaction doesn't get supported by org.hibernate.dialect.MySQL5Dialect

    Rather use org.hibernate.dialect.MySQL5InnoDBDialect

    0 讨论(0)
提交回复
热议问题