SSM_OA.Spring,xml文件配置
来源:互联网 发布:专业足球数据网站 编辑:程序博客网 时间:2024/06/06 00:04
<?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:mvc="http://www.springframework.org/schema/mvc" 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-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"> <!-- 引入数mybatis配置文件 --> <import resource="./application-mybatis.xml" /> <!-- 事务管理器 事物管理器类型必须跟数据源类型一致 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <!-- 配置事务控制 --> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="add*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="insert*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="create*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="delete*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="remove*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="update*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> <tx:method name="modify*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception" /> </tx:attributes> <!-- qry/query/select --> </tx:advice> <aop:config> <!-- 配置切点为service层 SSM\src\com\qianfeng\application\service --> <aop:pointcut id="pointCut" expression="execution(* com.qsy..service.*.*(..))" /> <aop:advisor pointcut-ref="pointCut" advice-ref="txAdvice" /> </aop:config> <!-- 扫描@Service注解的类,完成bean创建和依赖注入 (服务层、数据层) --> <context:component-scan base-package="com.qsy" use-default-filters="false"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Service" /> </context:component-scan></beans>
阅读全文
0 0
- SSM_OA.Spring,xml文件配置
- SSM_OA的web.xml文件简单配置
- spring XML文件配置
- spring 配置xml文件
- spring xml文件配置
- spring xml配置properties文件
- 配置Spring的XML文件
- Spring零配置xml文件
- Spring 定时器 xml文件配置
- spring mvc xml文件配置
- Struts-Spring-Hibernate(XML文件配置)
- Spring配置定时器的xml文件
- Spring配置xml文件实现AOP
- spring配置bean.xml头文件模板
- Spring常用的web.xml文件配置
- spring配置多个xml文件
- Spring Xml文件配置实现AOP通知
- Spring 配置XML文件头部文件格式
- idea intellij syso [System.out.println();快速生成]
- 学习日记19
- jQuery
- HTML之表单的使用
- cocos2dx工程的插件
- SSM_OA.Spring,xml文件配置
- 【WC2002】奶牛浴场
- 位查询
- CentOS7--iptables的配置
- 使用selenium 登录QQ空间
- 2016 matlab 中文版软件和安装教程
- Vue自定义图片懒加载指令v-lazyload详解
- SSM_OA_MYbatis配置
- 从github上下载没有用SSH KEY(为什么?)