AOP 방식으로 배치에서 에러 발생 시 로그 찍어줄 때 사용
애스펙트(Aspect)란?
Advice + PointCut = Aspect
APO 기본개념: https://shlee0882.tistory.com/206
@Aspect: https://jeong-pro.tistory.com/171
@Pointcut: https://gmoon92.github.io/spring/aop/2019/05/06/pointcut.html
@ConditionalOnProperty 는 환경 속성이 있고 특정 값이 있는 경우에만 Bean 등록을 가능하게 합니다. 기본적으로 지정된 속성은 정의되어야 하며 false 와 같지 않아야 합니다.
출처: https://recordsoflife.tistory.com/605
커스터마이즈한 spring actuator 엔드포인트.
액추에이터- 실행 중인 애플리케이션의 내부를 볼 수 있게 하고, 어느 정도까지는 애플리케이션의 작동 방법을 제어할 수 있게 한다.
예를 들면, 다음과 같다.
애플리케이션 환경에서 사용할 수 있는 구성 속성들
애플리케이션에 포함된 다양한 패키지의 로깅 레벨(logging level)
애플리케이션이 사용 중인 메모리
지정된 엔드포인트가 받은 요청 횟수
애플리케이션의 건강 상태 정보
출처: https://incheol-jung.gitbook.io/docs/study/srping-in-action-5th/chap-16.
@WriteOperation
@Endpoint 어노테이트된 @Bean을 추가한다면, @ReadOperation, @WriteOperation, @DeleteOperation과 같이 어노테이트된 메소드들은 자동적으로 JMX와 웹앱에서 HTTP를 통해 노출된다. 엔드포인트들은 Jersey, 스프링 MVC나 Spring WebFlux를 사용해서 노출될 수 있다.
출처: https://wannaqueen.gitbook.io/spring5/spring-boot/undefined-1/53.-endpoints/53.7-by-ks
Feign 은 Netflix 에서 개발된 Http client binder 입니다.
Feign 을 사용하면 웹 서비스 클라이언트를 보다 쉽게 작성할 수 있습니다.
Feign 을 사용하기 위해서는 interface 를 작성하고 annotation 을 선언 하기만 하면됩니다.
출처: https://techblog.woowahan.com/2630/
예제 여기서보셈요~
https://bepoz-study-diary.tistory.com/414
feignClient 객체의 config 속성 커스텀
https://sabarada.tistory.com/116?category=822738
자바의 암호화&복호화 담당
클래스 레벨에 붙이거나 생성자에 붙여주면 파라미터를 활용하여 빌더 패턴을 자동으로 생성함
Example 4. Without Boot 참고
https://docs.spring.io/spring-kafka/reference/html/#preface
자바 환경변수 파일에서 특정 프로퍼티의 값을 읽어올 때
ex) @Value("{spring.application.name}")
멀티 스레드로 스탭 실행하기 위해 필요
TaskExecutor executor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5); // 기본 스레드 풀 크기
executor.setMaxPoolSize(5); // 4개의 스레드가 이미 처리 중인데 작업이 더 있을 경우 몇 개까지 스레드를 늘릴 건지
executor.setThreadNamePrefix("recommend-publish-"); // 스레드 이름 접두사
executor.setWaitForTasksToCompleteOnShutdown(Boolean.TRUE); // setWaitForTasksToCompleteOnShutdown: 진행 중이던 작업이 완료된 후 Thread를 종료한다
executor.initialize();
return executor;
}
참고: https://jojoldu.tistory.com/493
https://backtony.github.io/spring/2022-01-29-spring-batch-11/
https://ocblog.tistory.com/83
throttleLimit(poolSize)
기본값은 4 입니다.
생성된 쓰레드 중 몇개를 실제 작업에 사용할지를 결정합니다.
singleton 방식이 아니라 해당 Step의 실행 시점에 이 어노테이션이 붙은 친구를 Bean으로 생성