참고 글: 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
- Pattern
- 그래프
- Spring
- headers
- 2021 KAKAO BLIND RECRUITMENT
- 파이썬
- 알고리즘
- 프로그래머스
- Linux
- docker
- Python
- DRF
- postgres
- BFS
- dockerignore
- PostgreSQL
- Celery
- 카카오
- setattr
- docker-compose
- thread
- django
- env
- 면접
- 백준
- Java
- Collections
- Command Line
- 자바
- ubuntu
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |