Transactions, Spring.
annotation in a @Configuration class to enable transactional support. @Configuration @EnableTransactionManagement public class JPAConfig{ @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { //… } @Bean public PlatformTransactionManager transactionManager() {