日期:2014-05-18  浏览次数:20580 次

Spring AOP无法执行
请大侠们帮忙瞅瞅,为嘛无法运行起来呢:
配置如下:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-2.5.xsd"
>

    <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
    <context:annotation-config/>    
    <context:component-scan base-package="com.len"> </context:component-scan>
        <bean id="entityManagerFactory"
        class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="persistenceXmlLocation" value="WEB-INF/jpa.xml"/>
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
            <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                <property name="database" value="MYSQL" />
                 <property name="showSql" value="false" />
            </bean>
        </property>
    </bean>
    
<bean id="entityManagerAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<property name="advice">
<bean class="org.springframework.orm.jpa.JpaInterceptor" autowire="byName" />
</property>
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
   <property name="driverClassName" value="com.mysql.jdbc.Driver" />
   <property name="url" value="jdbc:mysql://127.0.0.1:3306/apkbak?useUnicode=true&amp;characterEncoding=utf8"/> 
       <property name="username" value="root"/>
       <property name="password" value=""/>
   <property name="initialSize" value="20"/>
   <property name="maxActive" value="100"/>
   <property name="maxIdle" value="20"/>
   <property name="minIdle" value="0"/>
           <property name="testOnBorrow"><va