<?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:p=" http://www.springframework.org/schema/p " xmlns:mvc=" http ://www.springframework.org/schema/mvc "xmlns:tx=" http://www.springframework.org/schema/tx " 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/mvc http:// Www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/ Spring-tx-3.0.xsd "><!-- hibernate sessionfactory by spring management --><bean id=" Sessionfactory "class=" Org.springframework.orm.hibernate3.LocalSessionFactoryBean "><property name=" Configlocation " value=" Classpath:hibernate.cfg.xml "></property></bean><!-- Sessionfactory to spring transaction manager management --><bean id= "TransactionManager" class= " Org.springframework.orm.hibernate3.HibernateTransactionManager "><property name=" Sessionfactory " ref= "Sessionfactory" /></bean><!-- Data Processing DAO class sessionfactory factory class -->< Bean id= "Commondao" class= "Com.yjm.dao.CommonDAO" scope= "singleton" ><property name= " Sessionfactory " ref=" sessionfactory "></property></bean><!-- Logic processing service class Food--><bean id= "Foodservice" class= "COm.yjm.service.FoodService "><property name=" Commondao " ref=" Commondao "></property> </bean><!-- Logic Processing service class user--><bean id= "UserService" class= " Com.yjm.service.UserService "><property name=" Commondao " ref=" Commondao "></property> </bean><bean id= "Aspectbean" class= "Com.yjm.aspectbean.AspectBean" ></bean><bean id= "Ta1" class= "com.yjm.aspectbean.TestA1" ></bean><bean id= "Testaspect1" class= "Com.yjm.aspect.TestAspect" ></bean><bean id= "Testaspect" class= " Com.yjm.aspect.TestAspectImp "></bean><bean id=" T1 " class=" Com.yjm.aspectbean1.Test1 "> </bean><aop:config proxy-target-class= "false" ><aop:aspect ref= "Testaspect" ><AOP :p ointcut id= "poicut" expression= "Execution (* com.yjm.aspectbean.*.* (..))" /><aop:before method= "Test1" pointcut-ref= "Poicut" /><aop:after-returning method= "Test2" pointcut-ref= "Poicut" /><aop:after Method= "Test3" pointcut-ref= "Poicut" /><aop:after-throwing method= "test4" pointcut-ref= "Poicut" /></aop:aspect><aop:aspect ref= "Testaspect1" ><aop:pointcut id= "POICUT1" expression= "Execution (* com.yjm.aspectbean1.*.* (..))" /><aop:before method= "Ect1" pointcut-ref= "POICUT1" /><aop:after-returning method= "Ect2" pointcut-ref= "poicut1" /><aop:after method= "Ect3" pointcut-ref= " Poicut1 " /><aop:after-throwing method=" Ect4 " pointcut-ref=" POICUT1 "&NBSP;/></AOP: Aspect></aop:config><bean id= "test22" class= "Com.yjm.aspectbean2.Test2" ></bean> <aop:config><aop:aspect ref= "Testaspect1" ><aop:pointcut expression= "Execution (* Com.yjm.aspectbean2.*.* (..)) " Id= "P1" /><aop:before method= "Ect1" pointcut-ref= "P1" /><aop:after-returning method= "Ect2" pointcut-ref= " P1 " /></aop:aspect></aop:config></beans>
Record configuration information