2017-05-06 21:19:12,934 WARN [org.springframework.context.support.ClassPathXmlApplicationContext] -

2017-05-06 21:19:12,934 WARN [org.springframework.context.support.ClassPathXmlApplicationContext] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'book' defined in class path resource [applicationContext3.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 32

我遇到了此错误,原因是因为在配置srpring-aop的xml文件时切入点错误:

   错误写法:"*"后面没有空格
     

   正确写法:"*"后面加了空格就好了

      * cn.dahua.aop.Book.*(..))" id="pointcut1"/>   

希望对你们有帮助

你可能感兴趣的:(开发工具及异常)