AOP를 사용하여 custom Annotation의 Log만 출력하기
운영을 하다보면 서비스가 살아있는지 데이터베이스 연결이 잘되었는지 체크를 하는데 해당 이력들은 로그에서 제외하고 원하는 메소드만 로그로 남기고 싶을때 사용하면 된다. Custom Annotaion을 만들기 @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface LoggerTarget { } LoggerTarget 이라는 이름으로 Annotation을 만들어줬다. 메소드영역이고 런타임범위까지 되도록 만들어준다. AOP 설정하기 @Aspect @Component @Slf4j public class LoggingAspect { private final String ANNOTATION_LOGGER_TARGET = "@an..
📺 Develop/🌴 Spring
2023. 7. 17. 17:41
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- pip requirements 생성
- 맥린이 앱 추천
- 맥 앱 추천
- pip requirements
- 맥북 in a case you entered incorrect password please update it in keychain access application.
- pip requirements 설치
- fork in a case you entered incorrect password please update it in keychain access application.
- pip 패키지 목록
- git-fork in a case you entered incorrect password please update it in keychain access application.
- pip 패키지
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함