Why are transactions not rolling back when using SpringJUnit4ClassRunner/MySQL/Spring/Hibernate

前端 未结 5 1315
谎友^
谎友^ 2021-02-06 16:04

I am doing unit testing and I expect that all data committed to the MySQL database will be rolled back... but this isn\'t the case. The data is being committed, even though my

5条回答
  •  Happy的楠姐
    2021-02-06 16:57

    For me defaultAutoCommit and @Transactional didn't help. I had to change db type to InnoDB

提交回复
热议问题