Java/Spring
[스프링 Error] java.lang.IllegalArgumentException: Pointcut is not well-formed 에러 해결 방법
ㅈㅣ니
2023. 6. 26. 16:12
AOP 에서 pointcut 형식 오류.
<aop:config>
<aop:aspect id="traceAspect" ref="logPrintProfiler4">
<aop:pointcut expression="execution(* org.doit.ik.aop..*.*(*,*))" id="publicMethod"/>
<aop:around method="trace" pointcut="publicMethod"/>
<aop:before method="before" pointcut="publicMethod"/>
<aop:after method="afterFinally" pointcut="publicMethod"/>
</aop:aspect>
</aop:config>
-> 내가 적은 코드 (에러 발생 코드)
여기에서 " pointcut " 이 아니라 " pointcut-ref " 를 넣어줘야한다.
<aop:config>
<aop:aspect id="traceAspect" ref="logPrintProfiler4">
<aop:pointcut expression="execution(* org.doit.ik.aop..*.*(*,*))" id="publicMethod"/>
<aop:around method="trace" pointcut-ref="publicMethod"/>
<aop:before method="before" pointcut-ref="publicMethod"/>
<aop:after method="afterFinally" pointcut-ref="publicMethod"/>
</aop:aspect>
</aop:config>
이렇게 바꿔줬더니 에러가 해결됐다.
반응형