[Spring] @Async 비동기로 처리하는 방법
사용법 초기설정 @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..
JVM/Spring
2022. 10. 1. 18:22
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Celery
- 파이썬
- BFS
- Spring
- PostgreSQL
- 프로그래머스
- setattr
- Command Line
- headers
- django
- 알고리즘
- Collections
- dockerignore
- env
- Java
- 2021 KAKAO BLIND RECRUITMENT
- Linux
- postgres
- docker-compose
- 면접
- thread
- ubuntu
- DRF
- Pattern
- 자바
- docker
- Python
- 백준
- 그래프
- 카카오
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함