spring配置 配置service上 不用加任何注释
2010-02-23 15:44
363 查看
<?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.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource"><ref bean="dataSource"/></property> </bean> <tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="insert*"/> <tx:method name="update*"/> <tx:method name="delete*"/> <tx:method name="find*" read-only="true"/> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut id="cpfoucsNetWorkTx" expression="execution(* com.cpfocus.network.service.*.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="cpfoucsNetWorkTx"/> </aop:config> </beans>
相关文章推荐
- 为什么struts2调用service层在spring里不用配置?
- Struts2+spring不用配置action和service的依赖关系 struts2-spring-plugin.jar(转)
- xml解析类,不用任何工具、配置和类库,一个类得到你想要的
- maven dao和service工程,spring 扫描jar中配置文件nullpointer的问题
- Spring的事务关于配置到service和dao中的区别
- 04 Spring 注解配置,简化xml配置,@Service、@Autowired简介
- Spring service继承的事务配置(注解)
- CXF之不用spring配置的实例(Simple Frontend)
- CXF与SPRING的无缝整合时,为什么不用写CXF的配置文件cxf-servlet.xml?
- Spring配置事务管理,service端通过@Transactional注解
- Spring基本配置、注释与简化配置介绍(转)
- spring配置出错at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:244
- Spring 通过配置向 Quartz定时任务 注入service
- spring-mvc配置异常问题FormattingConversionServiceFactoryBean
- 搭建spring框架的时候,web.xml中的spring相关配置,可以不用配置ContextLoaderListener(即只配DispatcherServlet)吗?
- 搭建spring框架的时候,web.xml中的spring相关配置,可以不用配置ContextLoaderListener(即只配DispatcherServlet)吗?
- Spring事务配置笔记(实现不同Service间调用事务)
- Spring RMI API调用 不用配置文件xml
- 04 Spring 注解配置,简化xml配置,@Service、@Autowired简介
- 04 Spring 注解配置,简化xml配置,@Service、@Autowired简介