日期:2014-05-18  浏览次数:20646 次

spring 事务 不回滚
spring 配置文件 如下:
<?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:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/aop
         http://www.springframework.org/schema/aop/spring-aop-3.0.xsd   
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
http://www.springframework.org/schema/jee 
http://www.springframework.org/schema/jee/spring-jee-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/tx
                      http://www.springframework.org/schema/tx/spring-tx-3.0."
       default-lazy-init="false">

    <description>Spring公共配置</description>
    <!--  后台异步请求RSS源的定时器
    <import resource="applicationContext-quartz-cron-local.xml" />
     -->
    <!-- 定义受环境影响易变的变量 -->
    <bean
            class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
        <property name="ignoreResourceNotFound" value="true"/>
        <property name="locations">
            <list>
                <!-- 标准配置 -->
                <value>classpath*:/application.properties</value>
                <!-- 集群中节点配置 -->
                <!--<value>classpath*:/application.cluster.properties</value>-->
                <!--&lt;!&ndash; 本地开发环境配置 &ndash;&gt;-->
                <!--<value>classpath*:/application.local.properties</value>-->
                <!-- 服务器生产环境配置 <value>file:/var/xpress/application.server.properties</value> -->