`

Cannot define both 'pointcut' and 'pointcut-ref' on <advisor> tag.

 
阅读更多

 

错误信息:

2013-09-01 14:00:56  Class [com.ibm.websphere.management.AdminServiceFactory] or one of its dependencies is not present: java.lang.ClassNotFoundException: com.ibm.websphere.management.AdminServiceFactory
iException in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot define both 'pointcut' and 'pointcut-ref' on <advisor> tag.
Offending resource: class path resource [applicationContext.xml]
Aspect: id='asp'
 -> Advice (before)
 at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
 at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
 at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
 at org.springframework.aop.config.ConfigBeanDefinitionParser.parsePointcutProperty(ConfigBeanDefinitionParser.java:502)
 at org.springframework.aop.config.ConfigBeanDefinitionParser.createAdviceDefinition(ConfigBeanDefinitionParser.java:420)
 at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAdvice(ConfigBeanDefinitionParser.java:363)
 at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAspect(ConfigBeanDefinitionParser.java:258)
 at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:148)
 at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
 at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1253

 

解决方案:

错误原因是因为配置AOP时,通知里面引入了切入点,如果在配置一个切入点就会发生以上错误.

比如: 

<aop:beforepointcut-ref="mycut"method="doAccessCheck" pointcut="execution(* com.java.spring..*.*(..))"/>

 

 

正确的应该是:

<aop:beforepointcut-ref="mycut"method="doAccessCheck" />

或者

<aop:before pointcut="execution(* com.java.spring..*.*(..))“ method="doAccessCheck" />

 

分享到:
评论

相关推荐

    rm2.6正式版本

    Report Machine 2.6&lt;br&gt;===================&lt;br&gt;&lt;br&gt;这是一个报表控件包,For Borland Delphi Versions 3,4,5,6,7.100% 源码.&lt;br&gt;&lt;br&gt;最后更新日期:2002.10.11&lt;br&gt;&lt;br&gt;目录&lt;br&gt;-----&lt;br&gt; 说明&lt;br&gt; 特点&lt;br&gt; 最后...

    VB编程资源大全(英文源码 表单)

    onto the form also.&lt;END&gt;&lt;br&gt;3 , noclose.zip&lt;br&gt;This demonstrates how to remove the "X" located on the top of your form, while keeping the maximize and minimize buttons visible.&lt;END&gt;&lt;br&gt;4 , dos-menu....

    C++ Synax(语法考试手册)

    - `&lt;name&gt;`、`&lt;expression&gt;`等用尖括号`&lt;&gt;`包围的词汇表示变量名、表达式等,用于泛指某些内容。 - 示例:`&lt;name&gt;=&lt;expression&gt;`可以表示`x=5`或`name="John"+"Stewman"`。 2. **语句**: - `&lt;statement&gt;`可以是...

    mp4creator

    -H263CbrTolerance=&lt;value&gt; Define H.263 CBR tolerance of [value] (default: 10 %) -hint[=&lt;track-id&gt;] Create hint track, also -H -interleave Use interleaved audio payload format, also -I -list List ...

    VB编程资源大全(英文源码 网络)

    Date Format, Day Name, Month Name...&lt;END&gt;&lt;br&gt;2 , netstuff.zip&lt;br&gt;This program queries the network and shows the Domains/Servers/Workstations structure. It also shows the users of each Server or ...

    VB编程资源大全(英文源码 控件)

    on left and right side of a text box.&lt;END&gt;&lt;br&gt;40,Assist.zip&lt;br&gt;A simple application with source code which shows how to save the contents of a rich text box without the help of common dialog box.&lt;END&gt;...

    hammer:一个零配置工具,用于使用现代语言开发网站和应用程序,但仍与平台保持密切联系

    :hammer: 锤子 ... hammer bundle &lt;src&gt; &lt;dest&gt; [--minify] [--define=&lt;K&gt;=&lt;V&gt;...] [--sourcemap=&lt;external&gt;] [--extract-css] [--css-modules] hammer trace &lt;src&gt; [--flat|--orphans] [--json] hammer -h

    Software Testing and Continuous Quality Improvement

    Software Testing and Continuous Quality Improvement&lt;br&gt;&lt;br&gt;SECTION I SOFTWARE QUALITY IN PERSPECTIVE . . . . . . . . . . . . . . . 1&lt;br&gt;1 Quality Assurance Framework. . . . . . . . . . . . . . . . . ....

    UML Applied: A .NET Perspective(1)

    UML Applied: A .NET Perspective 第一部分&lt;br&gt;Table of Contents &lt;br&gt; UML Applied—A .NET Perspective &lt;br&gt; Foreword &lt;br&gt; Introduction &lt;br&gt; Part One - UML and Five-Step UML: It's all About Communication ...

    Visual C++ 编程资源大全(英文源码 其它)

    16.zip&lt;br&gt;Comment / Uncomment macros&lt;br&gt;命令/反命令宏(5KB)&lt;END&gt;&lt;br&gt;17,17.zip&lt;br&gt;Custom built files&lt;br&gt;自定义生成的文件(5KB)&lt;END&gt;&lt;br&gt;18,18.zip&lt;br&gt;Define Method&lt;br&gt;定义方法(5KB)&lt;END&gt;&lt;br&gt;19,19.zip&lt;br&gt;...

    webservice-ajax

    ...&lt;br&gt; &lt;/httpHandlers&gt;&lt;br&gt; ...&lt;br&gt; &lt;/system.web&gt;&lt;br&gt; ...&lt;br&gt;&lt;configuration&gt;&lt;br&gt;Making client-side JavaScript code&lt;br&gt;Let us take a look at the default.aspx file that was automatically created in our ...

    Android_Define_Button.rar_android_按钮 安卓

    &lt;solid android:color="#FF0000" /&gt; &lt;!-- 默认填充颜色 --&gt; &lt;corners android:radius="5dp" /&gt; &lt;!-- 圆角 --&gt; &lt;stroke android:width="2dp" android:color="#00FF00" /&gt; &lt;!-- 边框宽度和颜色 --&gt; &lt;/shape&gt; ``...

    自己制作的一个《学霸模拟器》

    #include&lt;bits/stdc++.h&gt;#include&lt;stdio.h&gt;#include&lt;windows.h&gt;#include&lt;conio.h&gt;#include&lt;stdlib.h&gt;#include&lt;time.h&gt;#define LEN 30#define WID 25#include&lt;bits/stdc++.h&gt;#include&lt;iostream&gt;#include&lt;fstream&gt;#...

    C++ 头文件大全

    - `&lt;shared_ptr&gt;`,`&lt;unique_ptr&gt;` 和 `&lt;weak_ptr&gt;`:智能指针,自动管理内存。 - `&lt;tuple&gt;`:元组类型,存储多个不同类型的数据。 - `&lt;forward_list&gt;`:单向链表容器。 5. **预处理器指令**: - `#include`:...

    MS.Press.Software.Requirements.2nd.Edition

    Team LiB&lt;br&gt;Summary:&lt;br&gt;"Requirements" are essential for creating successful software because they let users and developers agree on what features will be delivered in new systems. Karl Wiegers's ...

    RRGRID

    COLUMN_NORESIZE 0x00200000L&lt;br&gt;//列头(第0行)是否显示ABCDE标识&lt;br&gt;#define GS_COLHEAD_CUSTOM 0x00400000L&lt;br&gt;//行头(第0列)是否显示12345标识&lt;br&gt;#define GS_ROWHEAD_CUSTOM 0x00800000L&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;...

    配置spring

    &lt;property name="dataSource" ref="dataSource" /&gt; &lt;property name="configLocation" value="/WEB-INF/conf/sqlMapConfig.xml" /&gt; &lt;/bean&gt; ``` 在`sqlMapConfig.xml`中,你需要引用SQL映射文件(如`.xml`文件...

    谷歌地图 delphi 封装库 2013 0.1.9 全面支持google maps api

    - Improvement: TPolyline -&gt; added Icon property to define the line of polyline. - Improvement: TGMRectangle -&gt; modified all Set and ShowElements methods to use the new method ChangeProperties ...

    FCKeditor.Net_2.5

    Version 2.5&lt;br&gt;Attention : This version is not compatible with releases before FCKeditor 2.5.1.&lt;br&gt;&lt;br&gt;New Features and Improvements:&lt;br&gt;&lt;br&gt;[#1548] Compatible with Safari 3.0+ and Opera 9.50+. &lt;br&gt;...

    c 贪吃蛇

    #define N 200&lt;br&gt;#include &lt;graphics.h&gt;&lt;br&gt;#include &lt;stdlib.h&gt;&lt;br&gt;#include &lt;dos.h&gt;&lt;br&gt;#define LEFT 0x4b00&lt;br&gt;#define RIGHT 0x4d00&lt;br&gt;#define DOWN 0x5000&lt;br&gt;#define UP 0x4800&lt;br&gt;#define ESC 0x011b&lt;br&gt;...

Global site tag (gtag.js) - Google Analytics