Spring AOP 错误:Pointcut is malformed: Pointcut is not well-formed

xiaoxiao2021-02-27  165

具体错误信息如下

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aspectDemo' defined in class path resource [spring-schema-advice.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 56 execution(*com.spring.demo.aop.schema.advice.biz.*Biz.*(..)) ^ ................

这说明是execution(com.spring.demo.aop.schema.advice.biz.*Biz.(..))出现了问题

解决方法:

在*和com.spring.demo.aop.schema.advice.biz.*Biz.*(..)之间添加空格
转载请注明原文地址: https://www.6miu.com/read-15121.html

最新回复(0)