Results 1 to 2 of 2

Thread: Spring AOP and @PostConstruct

  1. #1
    Join Date
    Sep 2011
    Posts
    4

    Default 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?

    TIA
    Last edited by mental_wao; Nov 16th, 2011 at 01:02 AM.

  2. #2
    Join Date
    Nov 2011
    Posts
    12

    Default

    Facing the same issue. Did you find a solution?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •