Spring AOP and Post Construct
I want to write the name of method which is using with @PostConstruct. But I found that AOP is unable to "Around" the PostConstruct method. Is there any way to use AOP with PostConstruct method? Give this a try. @Around("@annotation(javax.annotation.PostConstruct)") public void myAdvice(ProceedingJoinPoint jp) throws Throwable{ System.out.println("This is before " + jp.getSignature().getName() + "()"); jp.proceed(); } Additionally you need to activate compile-time weaving. I published a Demo project on github which uses maven. Clone https://github.com/jannikweichert/PostConstructAOPDemo and