记载配置信息
2015-12-30 11:34
330 查看
<?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 由spring管理 --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="configLocation" value="classpath:hibernate.cfg.xml"> </property> </bean> <!-- sessionfactory交给 spring事务管理器管理 --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <!-- 数据处理DAO类 sessionfactory工厂类 --> <bean id="commondao" class="com.yjm.dao.CommonDAO" scope="singleton"> <property name="sessionFactory" ref="sessionFactory"></property> </bean> <!-- 逻辑处理service类 Food--> <bean id="foodservice" class="com.yjm.service.FoodService"> <property name="commonDAO" ref="commondao"></property> </bean> <!-- 逻辑处理service类 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:pointcut 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" /> </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>
相关文章推荐
- remove duplicates from sorted array
- 验证码无法显示报异常 Could not initialize class sun.awt.X11GraphicsEnvironment
- Android Studio 快捷键(汇总)
- Android 可拖拽的GridView效果实现, 长按可拖拽和item实时交换
- 给新公司做的自动化和持续集成计划
- sikuli运行出现问题:Win32Util.dll: Can't load 32-bit .dll on a AMD 64 bit platform
- cinder /etc/lvm/lvm.conf 注意点
- iOS开发- 蓝牙后台接收数据(BLE4.0)
- 性能分析与调优的原理
- CentOS 6.5下利用Rsyslog+LogAnalyzer+MySQL部署日志服务器
- Andriod(一)--环境搭建
- s5k5e2ya MIPI 摄像头调试
- 后台订单添加weight等栏目
- Cas(03)——Cas Server中各配置文件介绍
- android 启动页面的设置
- 深入分析JavaWeb Item38 -- 监听器(Listener)快速学习
- 文件名浏览器兼容性(解决.net 文件名在IE和FireFox不兼容)
- 队列
- java枚举使用详解
- JavaEE_SSM_Mybatis_generator逆向工程的配置详解