참고 글: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/event/EventListener.html 구조 파악하기 @EventListener를 사용하는 방법은 다음과 같다. EventPublisher @Component @RequiredArgsConstructor public class EventPublisher { private final ApplicationEventPublisher publisher; public void publish(PublicEvent event) { publisher.publishEvent(event); } } EventSubscriber @Componen..
사용법 초기설정 @SpringBootApplication @EnableAsync public class SpringplaygroundApplication { public static void main(String[] args) { SpringApplication.run(SpringplaygroundApplication.class, args); } } 첫 번째로 @EnableAsync을 설정해야 한다. 그래야 비동기로 동작하는 데 필요한 Bean 들이 등록이 된다. 돌리고자 하는 클래스 또는 메소드 @Slf4j @Service @Async public class AsyncService { public void myAsyncCall() throws InterruptedException { Thread.sle..
- Total
- Today
- Yesterday
- 프로그래머스
- 면접
- ubuntu
- docker
- Celery
- 백준
- DRF
- env
- dockerignore
- thread
- setattr
- headers
- Collections
- 카카오
- Command Line
- 2021 KAKAO BLIND RECRUITMENT
- 자바
- postgres
- Spring
- 알고리즘
- Pattern
- BFS
- docker-compose
- Linux
- django
- Python
- 그래프
- 파이썬
- PostgreSQL
- Java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |