-
spring boot 에서 JOOQ 사용시, 구동 1분이상 느려짐 현상 (버그)IT/spring 2021. 2. 4. 15:32
spring boot 에서 JOOQ사용시 구동 1분이상 느려짐 현상 (버그)
1. 현상
boot 구동시에 80초이상 느려짐 발생
2. 윈인점 파악
AOP쪽 execution 표현식에 따른 JOOQ와의 버그
https://github.com/jOOQ/jOOQ/issues/5902
@Aspect @Component @Order @Slf4j public class CheckHeaderAOP { @Before("execution(* com.omnicns.omnifit2.api.controller..*Controller.*(..))") public void checkHeaderBefore(JoinPoint joinPoint) throws IOException { log.debug("AOP"); }
}
aspectjweaver가있는 버그라고 생각합니다.
어떤 이유로, org.aspectj.weaver.internal.tools.PointcutExpressionImpl의 couldMatchJoinPointsInType 메소드는 실행과 함께 pointcut을 사용할 때 true를 리턴하고,이 때문에 DefaultDSLContext의 모든 메소드가 점검되어 포인트 컷이 메소드에 적용될 수 있는지를 확인합니다. execution 대신 within를 사용하면 문제가 해결됩니다.
- 출처 jooq git issues
3. 문제 해결
@Before("within(com.omnicns.omnifit2.api.controller..*)")
public void checkHeaderBefore(JoinPoint joinPoint) throws IOException {
log.debug("AOP");
}visualkhh@gmail.com 다른분들은 삽질하지마세요. 제가 대신했어요
'IT > spring' 카테고리의 다른 글
spring boot oaauth2.0 (링크 정리 공유) (0) 2021.02.04 spring boot 정리 (locale, messageSource, security, jpa, hibernate, Scheduler, config) (0) 2021.02.04 spring에서 FCM (firebase cloud messaging) push 보내기. (11) 2021.02.04 JWT Token을 spring security에서 손쉽게 검증하기 위한 방법 (0) 2021.01.26 spring boot jwt (0) 2020.12.25