How to use @Transactional with Spring Data?

前端 未结 4 1252
無奈伤痛
無奈伤痛 2020-11-29 15:44

I just started working on a Spring-data, Hibernate, MySQL, JPA project. I switched to spring-data so that I wouldn\'t have to worry about creating queries by hand.

4条回答
  •  不知归路
    2020-11-29 16:07

    We also use @Transactional annotation to lock the record so that another thread/request would not change the read.

提交回复
热议问题