解决Pointcut is not well-formed
来源:互联网 发布:数据库建表 编辑:程序博客网 时间:2024/05/21 11:11
新手刚学习Spring,使用注解时
@Before("execution(*com.zhazhapan.spring.springtest.chapter.one.aop.DemoMethodService.*(..))")
总是报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aopConfig': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 79execution(*com.zhazhapan.spring.springtest.chapter.one.aop.DemoMethodService.*(..)) ^ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84) at com.zhazhapan.spring.springtest.chapter.one.aop.Main.main(Main.java:14)Caused by: java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 79
终于在stackoverflow上面找到了解决方案,原来是*之间需要空格,修改注解如下即可
@Before("execution(* com.zhazhapan.spring.springtest.chapter.one.aop.DemoMethodService.* (..))")//注意多了空格哦
阅读全文
0 0
- 解决Pointcut is not well-formed
- Pointcut is malformed: Pointcut is not well-formed: expecting 'name pattern' at character position 5
- Spring AOP 错误:Pointcut is malformed: Pointcut is not well-formed
- AOP注解异常: Pointcut is not well-formed: expecting '(' at character position 0 pointCut ^ 1
- Piontcut is not well-formed
- Pointcut is not well-formed: expecting '(' at character position 0 anyMethod
- Pointcut is not well-formed: expecting 'name pattern' at character position
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting '(' 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
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ‘name pattern’
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at charac
- java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ‘name pattern’
- 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
- DES加密解密
- 使用Tensorflow自定义一个线性分类器用于对“良/恶性乳腺癌肿瘤”进行预测
- 记录初学urllib库
- IE、FF、Chrome浏览器中的JS差异介绍
- 我想建立一篇不公开,仅私人能见的博文
- 解决Pointcut is not well-formed
- hdu 5446 Unknown Treasure lucas+CRT || 扩展lucas
- dlib 10 dlib自带demo GoogLeNet (inception)
- TCP协议的3次握手以及4次挥手
- 有趣的网站-第二弹
- [RK3288][Android6.0] 调试笔记 --- Recovery执行脚本方法
- The study of access restriction in Python(20170920) 访问限制
- 接口和抽象类的区别
- 【例子驱动学习】unique_ptr