Announcement Announcement Module
Collapse
No announcement yet.
Why pointcut.matches(String.class) return true Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why pointcut.matches(String.class) return true

    Hello.
    I am new to spring AOP and I write a small test
    of aspectJ AOP pointcut,

    public void test1() {

    AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
    pointcut.setExpression("execution(public * java.util.*.*(..))");

    System.out.println(pointcut.matches(String.class)) ;

    }


    I expect it will print out "false", because String.class is not include in java.util package.
    but actually it gives me the "true",
    What mistake I made?

    version: spring 3.0

    Thanks in advance.
Working...
X