注意在配置中可能遇到 hibernate中的asm.jar包 与spring中的asm2.3.3.jar包冲突导致hibernate中是不能初始化
可以通过MyEclipse 中window-->Preference-->spring-->2.5-->移除asm2.3.3.jar包
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="dao" class="cn.veryedu.dao.impl.AccountsTabDAOImpl">
</bean>
<bean id="service" class="cn.veryedu.service.impl.AccountsTabServiceImpl">
<property name="dao">
<bean parent="ProDao">
<property name="targetName">
<value>dao</value>
</property>
</bean>
</property>
<property name="manager">
<ref local="manager"/>
</property>
</bean>
<!--
<bean id="proxyService" class="cn.veryedu.service.impl.ProxyService">
<property name="service">
<ref local="service"/>
</property>
<property name="manager">
<ref local="manager"/>
</property>
</bean>
-->
<bean id="action" class="cn.veryedu.action.AccountAction" abstract="true">
<property name="service">
<bean parent="transactionService">
<property name="targetName">
<value>service</value>
</property>
</bean>
</property>
</bean>
<bean id="manager" class="cn.veryedu.transaction.TransactionManager">
</bean>
<bean name="/queryAccount" parent="action"></bean>
<bean name="/modifyAccount" parent="action"></bean>
<bean id="serviceBeforeAdvice"
class="cn.veryedu.advice.ServiceMethodAdvice">
</bean>
<bean id="serviceAfterAdvice"
class="cn.veryedu.advice.ServerAfterAdvice">
</bean>
<bean id="transactionAdvice"
class="cn.veryedu.advice.TransactionAdvice">
<property name="manager">
<ref local="manager"/>
</property>
</bean>
<bean id="transactionService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetName">
<value>service</value>
</property>
<property name="interceptorNames">
<list>
<value>serviceBeforeAdvice</value>
<value>serviceAfterAdvice</value>
<value>transactionAdvice</value>
</list>
</property>
</bean>
<bean id="ProDao" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="targetName">
<value>dao</value>
</property>
<property name="interceptorNames">
<list>
<value>serviceBeforeAdvice</value>
<value>serviceAfterAdvice</value>
</list>
</property>
</bean>
</beans>
1, contextLoaderPlngIn-->创建Spring容器环境-->根据contextConfigLocation的值
-->读取Spring的配置创建applicationContext对象-->2, 将applicationContext放入
servletContext对应的Aplication级会话中
delegatingRequestProcessor获得aplicationContext对象 application级会话中重写
processCreateAction获得Spring配置的Action对象