Nov 15th, 2011, 11:31 PM
Spring AOP and @PostConstruct
I have an annotation (@ExecTimeLogged) which is used as a part of a pointcut for an @Around advice which will log the execution time of the annotated method.
I have tested it with a random method in my app and the annotation and advice work. However, when I come to use it on a @PostConstruct method, or any method called from a @PostConstruct, it doesn't work.
I can see that this is because my class has not been proxied. Obviously Spring fully initialises the bean first before proxying it. Is there anyway to have @PostConstruct (or some other Spring init concept) run after the proxies have been applied?
Last edited by mental_wao; Nov 16th, 2011 at 01:02 AM.
Dec 26th, 2012, 02:32 AM
Facing the same issue. Did you find a solution?
Tags for this Thread