<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- 事务管理器配置 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- 使用annotation定义事务 -->
<tx:annotation-driven transaction-manager="transactionManager" />
<aop:config>
<!--
This definition creates auto-proxy infrastructure based on the given
pointcut, expressed in AspectJ pointcut language. Here: applying the
advice named "txAdvice" to all methods on classes in package and
subpackages.
-->
<aop:advisor pointcut="execution(* com.huawei..service..*.*(..))"
advice-ref="txAdvice" />
</aop:config>
<!--
Transaction advice definition, based on method name patterns. Defaults
to PROPAGATION_REQUIRED for all methods whose name starts with
"insert" or "update", and to PROPAGATION_REQUIRED with read-only hint
for all other methods. transaction-manager="transactionManager"
-->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true" />
<tx:method name="find*" read-only="true" />
<tx:method name="**" />
</tx:attributes>
</tx:advice>
<bean id="localeResolver"
class="org.springframework.web.servlet.i18n.SessionLocaleResolver" />
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>i18n/common/messages</value>
<value>i18n/system/system</value>
<value>i18n/log/log</value>
<value>i18n/cluster/cluster</value>
<value>i18n/trap/trap</value>
<value>i18n/ware/ware</value>
<value>i18n/unit/unit</value>
<value>i18n/cn/cn</value>
<value>i18n/license/license</value>
</list>
</property>
</bean>
</beans>
分享到:
相关推荐
spring配置文件实例
Spring配置文件集合Spring配置文件集合Spring配置文件集合Spring配置文件集合Spring配置文件集合Spring配置文件集合Spring配置文件集合
spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件spring配置文件...
使用Spring配置文件实现AOP
spring 配置文件 归类 IOC AOPspring 配置文件 归类 IOC AOP
spring 配置 文件
spring配置文件详解,Spring的applicationContext.xml文件代码:
spring配置文件加密实现
Spring配置 Spring 配置 映射 加注释!!!!Spring配置 Spring 配置 映射 加注释!!!!
Spring配置文件:注入各种数据时配置文件的配置格式
spring配置文件详解,交你如何理解spring,熟练运用spring
spring配置文件详细介绍 通过对xml配置的熟练掌握 相信spring真的太简单
文件中进行了详细介绍说明这个配置文件是典型XML格式但是它既冗长又不实用对于需要定义大量 Springbeans大工程来说我们难以阅读和管理它 在这篇文章里对于SpringXML配置我将向你展示12种比较好实战其中些实战不仅...
大型项目的struts,spring配置文件
Spring框架的一个配置文件。Spring框架主要解决了创建对象和管理对象的问题!
官方spring.xml中约束的引用说明文档,配置spring文件的时候添加约束所需要的文档说明.
本文档是很专业的 Spring动态加载配置文件,实现热部署方案。
本word详细介绍了spring各种配置文件,相信对于初学spring的各位大侠是个很好的阶梯、