병렬 단계가 있는 Spring 배치 작업
3373 단어 springbatchparallelspringboot
병렬 단계가 있는 Spring 배치 작업
배치 작업을 확장하기 위한 병렬 단계는 애플리케이션의 비즈니스 논리를 기반으로 하는 하나의 솔루션입니다. 로직 비즈니스를 별개의 책임으로 분할하고 각 단계를 병렬 흐름으로 실행할 수 있습니다. 튜토리얼은 Spring Batch로 병렬 단계를 구성하는 방법을 안내합니다.
관련 기사:
I. 스프링 배치 병렬 단계 튜토리얼을 위한 기술
– 자바 1.8
– 메이븐 3.3.9
– Spring 도구 세트 – 버전 3.8.1.RELEASE
– 스프링 부트
II. 개요
1. 프로젝트 구조
2. 해야 할 단계
III. 관행
1. 스프링 부트 프로젝트 생성
Spring Tool Suite를 열고 메인 메뉴에서 File->New->Spring Starter Project를 선택하고 프로젝트 정보를 입력합니다. 그런 다음 마침을 누르면 스프링 부트 프로젝트가 생성됩니다.
2. 종속성 추가
spring-boot-starter-batch, spring-boot-starter-web, mysql-connector-java 추가
<?xml version="1.0" encoding="UTF-8"?>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
3. 배치 작업 데이터 소스 구성
application.properties 열기, 배치 작업 저장소에 대한 스프링 데이터 소스 구성
spring.datasource.url=jdbc:mysql://localhost:3306/testdb
spring.datasource.username=root
spring.datasource.password=12345
spring.batch.job.enabled=false
https://grokonez.com/spring-framework/spring-batch/spring-batch-job-parallel-steps
병렬 단계가 있는 Spring 배치 작업
Reference
이 문제에 관하여(병렬 단계가 있는 Spring 배치 작업), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/loizenai/spring-batch-job-with-parallel-steps-16ld텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)