applicationContext:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<aop:aspectj-autoproxy></aop:aspectj-autoproxy>


<bean id="interceptor" class="com.dcj.aop.Interceptor"/>
<aop:config>
<aop:pointcut expression="public * com.dcj.service..*.deleteUser(..)" id="logPointcut" />
<aop:aspect id="logAspect" ref="interceptor">
<aop:before method="before" pointcut-ref="logPointcut" />
</aop:aspect> </aop:config>

</beans>
编译出错 Class 'org.springframework.aop.aspectj.AspectJExpressionPointcut' not found
在aop:pointcut aop:before 这两行 
jar包为 spring3.0 和aspectjweaver 和 aspectjrt

解决方案 »

  1.   

    package com.dcj.aop;import org.aspectj.lang.ProceedingJoinPoint;public class Interceptor {
    public void before() {
    System.out.println("method start ---------");
    } public void after() {
    System.out.println("method end ---------");
    } public Object around(ProceedingJoinPoint pjp) throws Throwable {
    before();
    Object retVal = pjp.proceed();
    after();
    return retVal;
    }
    }这是切面类 ,网上说如果传参数会出错 ,我这方法也没传参数啊。。
      

  2.   

    架包Spring-aop.jar的问题,你看是少架包,还是冲突的原因,Struts1.0,Srping2.5,hibernate3.2三个框架搭建起来完整架包数位84个,你自己看看...
      

  3.   

    看下spring-aspects.jar包有没有 
      

  4.   

    少这个包吧
    spring-aspects.jar
      

  5.   

    刚才看了代码确定了 spring-2.5.6.jar  里面有这个类应该是你的核心包版本比较低,你换成spring-2.5.6.jar 
      

  6.   

    我用的spring3.0 不是那个问题啊。。要不大家留个qq..方便交流
      

  7.   

    spring包的版本较低,下载个新版本的试试。