14 lines
No EOL
493 B
Java
14 lines
No EOL
493 B
Java
package com.example.demo.config;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
|
|
@Configuration
|
|
@EnableTransactionManagement
|
|
public class TransactionPolicyConfig {
|
|
@Bean
|
|
public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
|
|
return new JpaTransactionManager(entityManagerFactory);
|
|
}
|
|
} |