목록Spring/Spring Batch (3)
개발그래머
발견 스프링 multiple datasource 설정을 하기 위해 스프링부트에서 제공하는 default datasource를 사용하지 않고 수동으로 등록해 주는 작업을 하였다.(참조 : https://www.baeldung.com/spring-data-jpa-multiple-databases) //datasource 설정 @Configuration @EnableJpaRepositories( basePackages = "com.**.repository", entityManagerFactoryRef = "originEntityManager", transactionManagerRef = "originTransactionManager" ) public class PersistenceOriginConfig { @..
warn : org.springframework.batch.item.ItemProcessor is an interface. The implementing class will not be queried for annotation based listener configurations. If using @StepScope on a @Bean method, be sure to return the implementing class so listener annotations can be used. 번역 : org.springframework.batch.item.ItemProcessor는 인터페이스입니다. 구현 클래스는 주석 기반 리스너 구성에 대해 쿼리 되지 않습니다. @Bean 메서드에서 @StepScope를 사..
배치 작업이란? 배치작업 ↔ 실시간작업 배치작업 특정주기마다 작업들을 한 번에 모아서 처리 주문결제 후 배송 은행 정산 이메일 쿠폰 발송 가맹점 정산 거래 명세서 생성 추천 시스템 데이터 작업 스프링 배치로 작업이 필요한 이유 풍부한 기능 일관성 된 코드 기존 서비스가 스프링 프레임워크로 되어 있는 경우 호환 가능 완성도 있고 유지보수와 확장성 있는 개발 가능 스프링 배치 구성 JobLauncher JobExecution을 JobRepository로부터 얻고 Job을 실행 @EnableBatchProcessing 어노테이션을 통해 JobRepository를 자동으로 구성 Job 전체 배치 프로세스를 캡슐화하는 엔티티 전체 계층구조의 최상위 Step을 위한 단순한 인스턴스 컨테이너 정의와 Step들의 순서..