작성
·
726
2
https://drive.google.com/file/d/1db6-1LvayqONFQz_7MAwFU8JT9lWQwJp/view?usp=sharing
TimeTraceAop에 @Component를 쓰지 않고 SpringConfig에다가 @Bean으로 넣고 테스트케이스를 돌렸는데 순환 참조 에러가 발생했습니다.
The dependencies of some of the beans in the application context form a cycle:
memberController defined in file [/Users/hwangdonghwan/Desktop/Study/hello-spring/out/production/classes/hello/hellospring/controller/MemberController.class]
↓
memberService defined in class path resource [hello/hellospring/SpringConfig.class]
┌─────┐
| timeTraceAop defined in class path resource [hello/hellospring/SpringConfig.class]
└─────┘
@Around("execution(* hello.hellospring..*(..))")
이 부분을
@Around("execution(* hello.hellospring.service..*(..))")
이렇게 바꾸면 제대로 실행이 되는데.. 왜 그런지 모르겠습니다..
답변 1
0