Pointcut is not well-formed: expecting 'name pattern' at character position
来源:互联网 发布:水产品进出口数据 编辑:程序博客网 时间:2024/05/22 03:12
配置aop报错:原因是配置切点表达式的时候报错了,
星号后面没有加空格:
<aop:config> <!-- 配置那些包的类要切入事务 --> <aop:pointcut id="pointcut" expression="execution(*cn.it.shop.service.impl.*.*(..))"/> <aop:advisor advice-ref="advice" pointcut-ref="pointcut"/><!-- 连接了上面的advice和上面的pointcut --> <!-- aop:pointcut要写在aop:advisor上面,否则报错 --></aop:config>
其中,切入点表达式的使用规则:
1、execution(): 表达式主体。
2、第一个**号:表示返回类型, 表示所有的类型。
3、包名:表示需要拦截的包名,后面的两个句点表示当前包和当前包的所有子包,com.sample.service.impl包、子孙包下所有类的方法。
4、第二个*号:表示类名,号表示所有的类。
5、*(..):最后这个星号表示方法名,号表示所有的方法,后面括弧里面表示方法的参数,两个句点表示任何参数。
1 0
- Pointcut is malformed: Pointcut is not well-formed: expecting 'name pattern' at character position 5
- Pointcut is not well-formed: expecting 'name pattern' at character position
- Pointcut is not well-formed: expecting 'name pattern' at character position
- Pointcut is not well-formed: expecting 'name pattern' at character position 36
- Pointcut is not well-formed: expecting 'name pattern' at character position
- Pointcut is not well-formed: expecting 'name pattern' at character position
- Pointcut is not well-formed: expecting 'name pattern' at character position
- Pointcut is not well-formed: expecting 'name pattern' at character position
- 配置aop报错: Pointcut is not well-formed: expecting 'name pattern' at character position
- 配置AOP出错:Pointcut is not well-formed: expecting 'name pattern' at character position
- 坑之Pointcut is not well-formed: expecting 'name pattern' at character position异常
- Pointcut is not well-formed: expecting 'name pattern' at character position
- spring aop 报错Pointcut is not well-formed: expecting ‘name pattern’ at character position 48 executi
- AOP注解异常: Pointcut is not well-formed: expecting '(' at character position 0 pointCut ^ 1
- Pointcut is not well-formed: expecting '(' at character position 0 anyMethod
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting '(' at character position
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at charac
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ‘name pattern’
- [编程之美-08]字符串中数字子串的求和
- Excel VBA 中单元格选取
- 第十二周:[leetCode] 152. Maximum Product Subarray
- socket与http的区别
- python统计文本字数
- Pointcut is not well-formed: expecting 'name pattern' at character position
- 第一个程序:HelloWorld
- [模板]
- C# Process执行cmd指令,实时获取输出并隐藏cmd窗口
- 使用包管理 Java 中的类
- PAT-A-1056. Mice and Rice (25)
- ThinkPHP5.0-响应
- 设置div最小宽度
- JSTL(1)使用JSTL