zoukankan      html  css  js  c++  java
  • aop郁闷错误

    很郁闷的错误,终于解决了:

    <aop:config>
      <aop:aspect ref="log">
       <aop:pointcut id="aopTest" expression="execution(*com.gc.action.HelloWorldActionDAO.*(..))"/>
       <aop:around method="around" pointcut-ref="aopTest"/>
      </aop:aspect>
     </aop:config>

    严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/spring-servlet.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': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [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 47
    execution(*com.gc.action.HelloWorldActionDAO.*(..))
                                                   ^

    修改:

    <aop:config>
      <aop:aspect ref="log">
       <aop:pointcut id="aopTest" expression="execution(* com.gc.action.HelloWorldActionDAO.*(..))"/>
       <aop:around method="around" pointcut-ref="aopTest"/>
      </aop:aspect>
    </aop:config>

    在*后面加一个空格,则解决问题,不错不知道啊,望大家能注意啊。

  • 相关阅读:
    【读书笔记】简约至上交互设计四策略目录
    Cassandra在Windows上安装及使用方法[转]
    [转]揭秘全球最大网站Facebook背后的那些软件
    过程改进计划
    制定项目管理计划
    在sublime text3中利用markdown
    ubuntu下更改用户名和主机名
    国庆有感
    最近两天学到的技术汇总
    看见了就当没有看见
  • 原文地址:https://www.cnblogs.com/toSeeMyDream/p/4463884.html
Copyright © 2011-2022 走看看