AOP切入点错误

AOP pointcut error

我在我的应用程序中使用 AOP,需要定义一个切入点, 我正在使用 spring 配置

 <aop:aspect id="aspect" ref="loggerBean">
    <aop:pointcut id="pointCut" expression="execution(public * *(..))"  />
    <aop:around pointcut="pointCut" method="logMethod"  />
 </aop:aspect>

但我遇到了异常

Caused by: java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting '(' at character position 0
pointCut
^

我做错了什么?

考虑到您提供的信息,我有两个想法:

  1. 包含logMethod的class是@Aspect吗?
  2. <aop:around pointcut-ref="pointCut" method"logMethod" /> 注意 pointcut-ref.

我相信后者是正确的,但现在无法检查。