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