Hibernate JPA 发表于 2018-05-12 | 分类于 Server , SpringBoot , Hibernate Transaction12345678910@Autowiredprivate EntityManager entityManager;try{ entityManager.transaction.begin() // do something entityManager.transaction.commit()} catch (e:Exception) { entityManager.transaction.rollback()}