Announcement Announcement Module
No announcement yet.
Spring AOP and @PostConstruct Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring AOP and @PostConstruct

    Hi all,

    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, 02:02 AM.

  • #2
    Facing the same issue. Did you find a solution?