<?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"
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">
<import resource="classpath:spring/applicationContext-action.xml"/>
<import resource="classpath:spring/applicationContext-service.xml"/>
<import resource="classpath:spring/applicationContext-dao.xml"/>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
<!-- 事务处理 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 事务控制 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="get*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<!-- 管理事务操作 -->
<aop:pointcut id="servicesPointcut"
expression="execution(* inc.exam.service.*.*(..))" />
<aop:advisor advice-ref="txAdvice"
pointcut-ref="servicesPointcut" />
</aop:config>
</beans>
分享到:
相关推荐
application.xml配置文件详解 application.xml配置文件详解 application.xml配置文件详解
activiti.cfg.xml和application.properties文件的整合配置,不能两个都存在,方便,适应
J2EE deployment files (application.xml)
- Application context definition for JPetStore's business layer. - Contains bean references to the transaction manager and to the DAOs in - dataAccessContext-local/jta.xml (see web.xml's ...
Spring项目application.xml配置文件加解密
Spring Boot技术知识点:如何获取application.yml配置文件里的相关属性
AndroidManifest.xml 是每个android程序中必须的文件。它位于整个项目的根目录,描述了package中暴露的组件(activities, services, 等等),他们各自的实现类,各种能被处理的数据和启动位置。 除了能声明程序中的...
application-service.xml
这是一些配置文件,可以作为参考,个人感觉很方便的学习方法
Log4j2学习笔记,引入log4j2的依赖-log4j2.xml配置模板-application.properties文件配置-使用
包含applicationContext.xml、db.properties、log4j.properties、spring-mvc.xml文件,方便搭建,省去写代码。。
J2EE 配置文件(application-client.xml) (英文)
spring Location* 任何以location开头的参数,每个参数都是指定一个spring的配置文件,在参数没有设置的情况下DWR会去读取spring的全局的配置文件. spring beanName 从配置文件中读取的bean的名称 “scope参数允许你...
打开dreamweaver时,提示文件 Designer.xml的工作区不能打开。 出现这样的问题,大家可以去网上下载一个 Designer.xml 文件,然后去 “C:\Documents and Settings\Administrator\Application Data\Adobe\Dreamweaver...
mac AS 找不到flutter 插件, 替换一下 ~/Library/Application Support/AndroidStudio3.4 下的 availables.xml 文件就好;
放到resources下即可, 如果不生效则在application.yml文件中加 logging: config: file:config/logback-spring.xml
文章代码
本篇文章主要介绍了详解spring applicationContext.xml 配置文件 ,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
springmvc项目中如何加载jar包中的spring配置文件