Spring Boot/Spring Batch 목표 아키텍처 정의 (BAIS-SPRING-ARC-001)
This commit is contained in:
parent
75c7089960
commit
6c663fc839
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue