Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Basic AOP not working

  1. #11

    Default

    Thanks Mike.
    It makes sense now. I have post my fix yesterday.
    --Gary

    Quote Originally Posted by Mike Bingham View Post
    Gary -

    The original pointcut expression you supplied:

    Code:
    com.dcci.spring.aop.HelloService.testReturnVal()
    will attempt to reference a named pointcut (defined with @Pointcut) called testReturnVal. However, it looks like you were trying to create a pointcut expression to match calls to an existing testReturnVal method. When creating a pointcut expression, you need to use one of the supported pointcut designators, such as execution(); otherwise, a simple method signature will be interpreted as a named pointcut. See here for more details on the available pointcut designators:

    http://static.springframework.org/sp...ts-designators
    Gary Liu

  2. #12
    Join Date
    May 2006
    Location
    Florianópolis, Brazil
    Posts
    57

    Default

    Quote Originally Posted by Mike Bingham View Post
    Just to fix the broken link:
    http://static.springframework.org/sp...ng-aop-proxies
    Because the "current" isn't working.

    By the way, Mike, do you mean that there is no pointcut capable of advising all called/executed internal methods?
    I've been trying to log all methods that are called in my controller that extends SimpleFormController. And by that I mean calling all inherited methods, including the finalones. Is that possible?

  3. #13
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Not with basic Spring AOP. You will need a fullblown AOP solution, like AspectJ, for that in combination with loadtime or compile time weaving.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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