next
-
Sequence 필터링 OperatorSpring Reactive Web Application/Project Reactor 2023. 8. 4. 05:00
filter filter() Operator는 Upstream에서 emit된 데이터 중 조건에 일치하는 데이터만 Downstream으로 emit 합니다. 즉, 파라미터로 입력받은 Predicate의 리턴 값이 true인 데이터만 Downstream으로 emit 합니다. import lombok.extern.slf4j.Slf4j; import reactor.core.publisher.Flux; /** * filter 예제 */ @Slf4j public class Example14_15 { public static void main(String[] args) { Flux .range(1, 20) .filter(num -> num % 2 != 0) .subscribe(data -> log.info("# onN..
-
06. JobBackEnd/Spring Batch 2021. 12. 16. 23:59
스프링 배치는 Job과 Step을 쉽게 생성 및 설정할 수 있도록 util 성격의 빌더 클래스들을 제공합니다. JobBuilderFactory JobBuilder를 생성하는 팩토리 클래스로 get(String name) 메서드를 제공합니다. jobBuilderFactory.get("jobName")으로 생성합니다. JobBuilder Job을 구성하는 설정 조건에 따라 두 개의 하위 빌더 클래스를 생성하고 실제 Job 생성을 위임합니다. SimpleJobBuilder: SimpleJob을 생성하는 Builder 클래스로 Job 실행과 관련된 여러 설정 API를 제공합니다. FlowJobBuilder: FlowJob을 생성하는 Builder 클래스로 내부적으로 FlowBuilder를 반환함으로써 Flow ..