标签:des blog http ar io os 使用 sp for
一、SSH 整个配置如下图所示:
1.
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:tool="http://www.springframework.org/schema/tool" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tool
http://www.springframework.org/schema/tool/spring-tool.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName"
value="${jdbc.driverClassName}">
</property>
<property name="url"
value="${jdbc.url}" />
<property name="username"
value="${jdbc.username}">
</property>
<property name="password"
value="${jdbc.password}">
</property>
</bean>
</beans>
2.
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:tool="http://www.springframework.org/schema/tool" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tool
http://www.springframework.org/schema/tool/spring-tool.xsd"
default-autowire="byName">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:zxdjbpmdb.properties</value>
</list>
</property>
</bean>
<!-- EHCACHE -->
<bean id="defaultCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:ehcache.xml</value>
</property>
</bean>
<!-- 定义ehCache的工厂,并设置所使用的Cache name -->
<bean id="ehCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager">
<ref local="defaultCacheManager"/>
</property>
<property name="cacheName">
<value>DEFAULT_CACHE</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml">
</property>
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<!-- 采用连接池
<prop key="hibernate.connection.provider_class">${hibernate.connection.provider_class}</prop>
<prop key="hibernate.proxool.pool_alias">${hibernate.proxool.pool_alias}</prop>
<prop key="hibernate.proxool.xml">proxool.xml</prop> -->
<!--允许使用二级缓存-->
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<!--选择的缓存器是EhCache-->
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
<!--允许使用查询缓存-->
<prop key="hibernate.cache.use_query_cache">true</prop>
</props>
</property>
<property name="mappingLocations">
<list>
<value>classpath*:jbpm.repository.hbm.xml</value>
<value>classpath*:jbpm.execution.hbm.xml</value>
<value>classpath*:jbpm.history.hbm.xml</value>
<value>classpath*:jbpm.task.hbm.xml</value>
<value>classpath*:jbpm.identity.hbm.xml</value>
</list>
</property>
</bean>
</beans>
3.
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:tool="http://www.springframework.org/schema/tool" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tool
http://www.springframework.org/schema/tool/spring-tool.xsd"
default-autowire="byName" >
<!-- 配置事务管理器 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- 通过方法名设置不同事物属性-->
<bean id="saveAttributeSource" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
<property name="properties">
<props>
<prop key="save*">PROPAGATION_REQUIRED, -Exception</prop>
<prop key="del*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="update*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="create*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="add*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="modify*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="make*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="do*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="Refer*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="flow*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="edit*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="copy*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="search*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="sel*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="get*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="find*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="query*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="find*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="check*">PROPAGATION_REQUIRED,-Exception</prop>
</props>
</property>
</bean>
<!-- 通过bean ID的名字自动创建代理事物 -->
<bean id="transProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<value>transAdvisor</value>
</list>
</property>
<property name="beanNames">
<list>
<value>*Service</value>
<value>*Service*</value>
<value>*service*</value>
</list>
</property>
</bean>
<!-- 指定通知所要应用的目标上之方法名称 -->
<bean id="transAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
<property name="advice">
<ref local="transInterceptor"/>
</property>
<property name="mappedName">
<value>*</value>
</property>
</bean>
<!-- 事物拦截 -->
<bean id="transInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributeSource">
<ref bean="saveAttributeSource"/>
</property>
</bean>
<!-- 基础业务事物代理 tkp-->
<bean id="baseTransactionProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="modify*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="del*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<!-- 工作流引擎 -->
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper">
<property name="jbpmCfg" value="jbpm.cfg.xml"></property>
</bean>
<bean id="processEngine" factory-bean="springHelper"
factory-method="createProcessEngine" />
<bean abstract="true" class="com.zxd.business.common.base.dao.impl.DefaultDao">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
</beans>
4.
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:tool="http://www.springframework.org/schema/tool" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tool
http://www.springframework.org/schema/tool/spring-tool.xsd"
default-autowire="byName">
<!-- 引入其他文件 -->
<import resource="classpath*:com/zxd/business/common/config/Common_DB_Config.xml"/>
<import resource="classpath*:com/zxd/business/common/config/Common_Hibernate_Config.xml"/>
<import resource="classpath*:com/zxd/business/common/config/Common_Transaction_Config.xml"/>
<!-- 引入jbpm文件 -->
<import resource="classpath*:com/zxd/business/jbpmmanage/config/Jbpm_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/jbpmmanage/config/Jbpm_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/jbpmmanage/config/Jbpm_Spring_Dao.xml"/>
<!-- 引入平台文件 -->
<import resource="classpath*:com/zxd/business/platform/config/Platform_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/platform/config/Platform_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/platform/config/Platform_Spring_Dao.xml"/>
<!-- 引入后台管理文件 -->
<import resource="classpath*:com/zxd/business/adminmanage/config/Admin_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/adminmanage/config/Admin_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/adminmanage/config/Admin_Spring_Dao.xml"/>
<!-- 引入帮助平台文件 -->
<import resource="classpath*:com/zxd/business/helpmanage/config/Help_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/helpmanage/config/Help_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/helpmanage/config/Help_Spring_Dao.xml"/>
<!-- 引入角色管理文件 -->
<import resource="classpath*:com/zxd/business/rolemanage/config/Role_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/rolemanage/config/Role_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/rolemanage/config/Role_Spring_Dao.xml"/>
<!-- 引入案件调度文件 -->
<import resource="classpath*:com/zxd/business/scheduling/config/Sdl_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/scheduling/config/Sdl_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/scheduling/config/Sdl_Spring_Dao.xml"/>
<!-- 引入文件上传和下载文件 -->
<import resource="classpath*:com/zxd/business/common/fileupload/config/fileupload_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/common/fileupload/config/fileupload_Spring_Service.xml"/>
<import resource="classpath*:com/zxd/business/common/fileupload/config/fileupload_Spring_Dao.xml"/>
<!-- 测试登录 -->
<import resource="classpath*:junit/jbpm/conf/test_Spring_Action.xml"/>
<!-- 消息管理 -->
<import resource="classpath*:com/zxd/business/messages/config/Msg_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/business/messages/config/Msg_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/business/messages/config/Msg_Spring_Service.xml"/>
</beans>
5.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.jdbc.batch_size">1000</property>
<!-- 系统管理员 -->
<mapping resource="com/zxd/business/rolemanage/dto/SymButtonInfo.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymCompany.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymNodeInfo.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymRoleInfo.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymUserInfo.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymZtbRoleButton.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymZtbRoleNode.hbm.xml"/>
<mapping resource="com/zxd/business/rolemanage/dto/SymZxdUserRole.hbm.xml"/>
<!-- 案件调度 -->
<mapping resource="com/zxd/business/scheduling/dto/CaseInfo.hbm.xml"/>
<mapping resource="com/zxd/business/scheduling/dto/CaseScheduling.hbm.xml"/>
<mapping resource="com/zxd/business/scheduling/dto/SeriesCase.hbm.xml"/>
<mapping resource="com/zxd/business/scheduling/dto/CaseSchedulinghis.xml"/>
<mapping resource="com/zxd/business/scheduling/dto/SeriesFiles.hbm.xml"/>
<!-- 工作流 -->
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowTemplate.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowApproveInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowAttachInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowFormInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowSchemeInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/EndCaseInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/TalkingPursInfo.hbm.xml" />
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/DulyFile.hbm.xml"/>
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/EndCasePort.hbm.xml"/>
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/WorkFlowDoPerson.hbm.xml"/>
<!-- 文件上传下载 -->
<mapping resource="com/zxd/business/common/fileupload/sqlmap/FileUploadInfo.xml" />
<!-- 调查日志 -->
<mapping resource="com/zxd/business/jbpmmanage/sqlmap/ZxdBpmSchemeinfo.hbm.xml"/>
<!-- 消息管理 -->
<mapping resource="com/zxd/business/messages/dto/Messages.hbm.xml"/>
<!-- 常用文档 -->
<mapping resource="com/zxd/business/adminmanage/sqlmap/CommonWord.hbm.xml"/>
</session-factory>
</hibernate-configuration>
6.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- 使用常量节点进行插件配置 -->
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.ui.theme" value="simple" />
<!--对bean进行缓存 -->
<constant name="struts.objectFactory.spring.useClassCache" value="true" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="name" />
<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
<constant name="struts.action.extension" value="do,action" />
<!-- 动态调用方法 -->
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.i18n.encoding" value="utf-8"></constant>
<constant name="struts.multipart.saveDir" value="/tmp"></constant>
<constant name="struts.multipart.maxSize" value="524288000"></constant><!-- 500M -->
<!--加载各自的配置文件 -->
<include file="struts-default.xml" />
<include file="com/zxd/business/common/exception/exception_Struts.xml"></include>
<include file="com/zxd/business/jbpmmanage/config/Jbpm_Struts.xml" />
<include file="com/zxd/business/platform/config/Platform_Struts.xml" />
<include file="com/zxd/business/adminmanage/config/Admin_Struts.xml" />
<include file="com/zxd/business/helpmanage/config/Help_Struts.xml" />
<include file="com/zxd/business/rolemanage/config/Role_Struts.xml" />
<include file="com/zxd/business/common/fileupload/config/fileupload_Struts.xml" />
<include file="com/zxd/business/scheduling/config/Sdl_Struts.xml" />
<!-- 消息管理 -->
<include file="com/zxd/business/messages/config/Msg_Struts.xml"></include>
</struts>
二、SSI 整个配置如下图所示:
2.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:jdbczxd.properties</value>
</list>
</property>
</bean>
<bean id="parentDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"></property>
</bean>
<!-- 配置数据连接字符串-->
<bean id="defalutdataSource" parent="parentDataSource">
<property name="url" value="${jdbc.url}"></property>
<property name="username" value="${jdbc.username}"></property>
<property name="password" value="${jdbc.password}"></property>
</bean>
<bean id="dataSource" class="com.zxd.autocontrol.common.dbchange.service.impl.DynamicDataSource">
<property name="targetDataSources">
<map key-type="java.lang.String">
<!-- 如果还有其他的数据源,就配置多个<entry>标签 -->
<entry key="default" value-ref="defalutdataSource"></entry>
</map>
</property>
<property name="defaultTargetDataSource" ref="defalutdataSource"></property>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref local="dataSource" />
</property>
</bean>
</beans>
3.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="commonResourceProviderImpl" class="com.zxd.autocontrol.common.ibatis.impl.CommonResourceProviderImpl">
<property name="configLocaltions">
<list>
<value>classpath:/com/zxd/autocontrol/common/config/sqlMapConfig.xml</value>
</list>
</property>
</bean>
<!-- spring的ibatis 配制 -->
<bean id="sqlMapClient" class="com.zxd.autocontrol.common.ibatis.SqlMapClientFactoryBean">
<property name="commonResourceProvider" ref="commonResourceProviderImpl" />
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="common" class="com.zxd.autocontrol.common.persist.CommonImpl" >
<property name="sqlMapClient" ref="sqlMapClient"></property>
</bean>
</beans>
4.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- 配置事务管理器 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource"> <ref bean="dataSource" /> </property>
</bean>
<!-- 通过方法名设置不同事物属性-->
<bean id="saveAttributeSource" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
<property name="properties">
<props>
<prop key="save*">PROPAGATION_REQUIRED, -Exception</prop>
<prop key="del*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="update*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="create*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="add*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="modify*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="make*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="do*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="Refer*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="flow*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="edit*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="copy*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="search*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="sel*">PROPAGATION_REQUIRED,-Exception</prop>
<prop key="get*">PROPAGATION_REQUIRED,-Exception</prop>
</props>
</property>
</bean>
<!-- 通过bean ID的名字自动创建代理事物 -->
<bean id="transProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<value>transAdvisor</value>
</list>
</property>
<property name="beanNames">
<list>
<value>*Service</value>
<value>*Service*</value>
<value>*service*</value>
</list>
</property>
</bean>
<!-- 指定通知所要应用的目标上之方法名称 -->
<bean id="transAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
<property name="advice">
<ref local="transInterceptor"/>
</property>
<property name="mappedName">
<value>*</value>
</property>
</bean>
<!-- 事物拦截 -->
<bean id="transInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributeSource">
<ref bean="saveAttributeSource"/>
</property>
</bean>
<!-- 基础业务事物代理 tkp-->
<bean id="baseTransactionProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED</prop>
<prop key="modify*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
</beans>
5.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="false" maxRequests="1500" maxSessions="1500"
maxTransactions="1500" useStatementNamespaces="true" />
<sqlMap resource="junit/sql/Testwy.xml"/>
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/NodeInfo.xml"/>
<sqlMap resource="com/zxd/autocontrol/logincontrol/sqlmap/login.xml"/>
<sqlMap resource="com/zxd/autocontrol/logincontrol/sqlmap/userarea.xml"/>
<sqlMap resource="com/zxd/autocontrol/common/dbchange/sqlmap/DynamicDBConfig.xml"/>
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/ZtbRoleNode.xml"/>
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/ReportInfoHP.xml"/>
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/ReportInfoHS.xml"/>
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/ReportInfoFS.xml"/>
<sqlMap resource="com/zxd/autocontrol/handlemanage/sqlmap/HandleCase_SqlMap.xml"/>
<sqlMap resource="com/zxd/autocontrol/blacklist/sqlmap/BlankInfo.xml"/>
<sqlMap resource="com/zxd/autocontrol/auditmanage/sqlmap/countTab.xml"/>
<sqlMap resource="com/zxd/autocontrol/auditmanage/sqlmap/ratioTab.xml"/>
<sqlMap resource="com/zxd/autocontrol/searchmanage/sqlmap/CaseMessageDetail.xml"/>
<sqlMap resource="com/zxd/autocontrol/searchmanage/sqlmap/CaseSuveryMessage.xml"/>
<sqlMap resource="com/zxd/autocontrol/searchmanage/sqlmap/RelevanceCase.xml"/>
<sqlMap resource="com/zxd/autocontrol/searchmanage/sqlmap/CaseBean.xml"/>
<sqlMap resource="com/zxd/autocontrol/auditmanage/sqlmap/comptroller.xml"/>
<sqlMap resource="com/zxd/autocontrol/auditmanage/sqlmap/fushenresult.xml"/>
<sqlMap resource="com/zxd/autocontrol/auditmanage/sqlmap/lipeishixiao.xml"/>
<sqlMap resource="com/zxd/autocontrol/common/dbchange/sqlmap/zxdcode.xml"/>
<!-- -->
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/RoleInfo.xml"/>
<!-- 录入平台 -->
<sqlMap resource="com/zxd/autocontrol/entry/sqlmap/EntryPlatform.xml"/>
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/AreaInfo.xml"/>
<sqlMap resource="com/zxd/autocontrol/helpmanage/sqlmap/Casesuggestion.xml"/>
<!-- 超级管理后台 -->
<sqlMap resource="com/zxd/autocontrol/supermanage/sqlmap/OperationRule.xml"/>
<sqlMap resource="com/zxd/autocontrol/supermanage/sqlmap/RiskPoint.xml"/>
<sqlMap resource="com/zxd/autocontrol/supermanage/sqlmap/ZlogSbactiveLog.xml"/>
<sqlMap resource="com/zxd/autocontrol/supermanage/sqlmap/wrongclean.xml"/>
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/UserInfo.xml"/>
<sqlMap resource="com/zxd/autocontrol/rolemanage/sqlmap/ManageArea.xml"/>
<!-- 导入信息 By chuenux -->
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Account.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/casemessage.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/claiminsurance.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Claiminsurances.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Claimmessage.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/damage.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/policycar.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/policyclause.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/policycorrect.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/policykind.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/policymain.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Psndamage.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Recognition.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/Threecar.xml"/>
<sqlMap resource="com/zxd/autocontrol/autoimport/sqlmap/userInfo.xml"/>
<!-- 报表平台 -->
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/ReportInfoKR.xml"/>
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/RepTDerived.xml"/>
<sqlMap resource="com/zxd/autocontrol/reportmanage/sqlmap/TrueQuestion.xml"/>
<!-- 二次严重用户:Admin author:zzj date[2012年12月6日 11:33:04]-->
<sqlMap resource="com/zxd/autocontrol/searchmanage/sqlmap/AdminInfo.xml"/>
<!--识别平台 -->
<sqlMap resource="com/zxd/autocontrol/recognizemanage/sqlmap/SingleCase.xml"/>
<sqlMap resource="com/zxd/autocontrol/recognizemanage/sqlmap/CaseDetail.xml"/>
</sqlMapConfig>
6.
<?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/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<!-- 引入其他文件 -->
<import resource="classpath*:com/zxd/autocontrol/common/config/Common_Ibatis_Config.xml"/>
<import resource="classpath*:com/zxd/autocontrol/common/config/Common_Transaction_Config.xml"/>
<import resource="classpath*:com/zxd/autocontrol/common/config/Common_DB_Config.xml"/>
<import resource="classpath*:com/zxd/autocontrol/rolemanage/conf/Spring_nodeinfo.xml"/>
<import resource="classpath*:com/zxd/autocontrol/common/syskey/Spring_syskey.xml"/>
<import resource="classpath*:junit/Spring_junit.xml"/>
<import resource="classpath*:com/zxd/autocontrol/logincontrol/conf/Spring_login.xml"/>
<!-- 引入审计平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/auditmanage/conf/Adt_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/auditmanage/conf/Adt_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/auditmanage/conf/Adt_Spring_Service.xml"/>
<!-- 引入导入平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Service.xml"/>
<!-- 引入高道德风险平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/blacklist/conf/Blk_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/blacklist/conf/Blk_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/blacklist/conf/Blk_Spring_Service.xml"/>
<!-- 引入处理平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/handlemanage/conf/Hdl_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/handlemanage/conf/Hdl_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/handlemanage/conf/Hdl_Spring_Service.xml"/>
<!-- 引入帮助中心平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/helpmanage/conf/Help_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/helpmanage/conf/Help_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/helpmanage/conf/Help_Spring_Service.xml"/>
<!-- 引入图片处理平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/photomanage/conf/Pho_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/photomanage/conf/Pho_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/photomanage/conf/Pho_Spring_Service.xml"/>
<!-- 引入自动识别平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/recognizemanage/conf/Rge_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/recognizemanage/conf/Rge_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/recognizemanage/conf/Rge_Spring_Service.xml"/>
<!-- 引入报表统计平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/reportmanage/conf/Rpt_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/reportmanage/conf/Rpt_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/reportmanage/conf/Rpt_Spring_Service.xml"/>
<!-- 引入查询平台Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/searchmanage/conf/Sch_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/searchmanage/conf/Sch_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/searchmanage/conf/Sch_Spring_Service.xml"/>
<!-- 引入超级管理后台文件 -->
<import resource="classpath*:com/zxd/autocontrol/supermanage/conf/Sup_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/supermanage/conf/Sup_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/supermanage/conf/Sup_Spring_Service.xml"/>
<!-- 引入数据源信息Spring文件 -->
<import resource="classpath*:com/zxd/autocontrol/common/dbchange/conf/DB_Spring_Action.xml"/>
<!-- 引入录入平台文件 -->
<import resource="classpath*:com/zxd/autocontrol/entry/conf/Entry_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/entry/conf/Entry_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/entry/conf/Entry_Spring_Service.xml"/>
<!-- Import Information By chuenux -->
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Action.xml"/>
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Dao.xml"/>
<import resource="classpath*:com/zxd/autocontrol/autoimport/conf/Imp_Spring_Service.xml"/>
</beans>
7.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- 使用常量节点进行插件配置 -->
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.devMode" value="false"/>
<constant name="struts.ui.theme" value="simple" />
<!--对bean进行缓存 -->
<constant name="struts.objectFactory.spring.useClassCache" value="true"/>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="name" />
<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory"/>
<constant name="struts.action.extension" value="do,action"/>
<!-- 动态调用方法 -->
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<constant name="struts.i18n.encoding" value="utf-8"></constant>
<constant name="struts.multipart.saveDir" value="upload"></constant>
<constant name="struts.multipart.maxSize" value="1000000000"></constant>
<!--加载各自的配置文件 -->
<include file="struts-default.xml" />
<include file="com/zxd/autocontrol/rolemanage/conf/Struts_nodeinfo.xml"/>
<include file="junit/Struts_junit.xml"/>
<include file="com/zxd/autocontrol/logincontrol/conf/Struts_login.xml"/>
<include file="com/zxd/autocontrol/common/exception/exception_Struts.xml"/>
<include file="com/zxd/autocontrol/auditmanage/conf/Adt_Struts.xml"/>
<include file="com/zxd/autocontrol/autoimport/conf/Imp_Struts.xml"/>
<include file="com/zxd/autocontrol/blacklist/conf/Blk_Struts.xml"/>
<include file="com/zxd/autocontrol/handlemanage/conf/Hdl_Struts.xml"/>
<include file="com/zxd/autocontrol/helpmanage/conf/Help_Struts.xml"/>
<include file="com/zxd/autocontrol/photomanage/conf/Pho_Struts.xml"/>
<include file="com/zxd/autocontrol/recognizemanage/conf/Rge_Struts.xml"/>
<include file="com/zxd/autocontrol/reportmanage/conf/Rpt_Struts.xml"/>
<include file="com/zxd/autocontrol/searchmanage/conf/Sch_Struts.xml"/>
<include file="com/zxd/autocontrol/common/dbchange/conf/DB_Struts.xml"/>
<include file="com/zxd/autocontrol/supermanage/conf/Sup_Struts.xml"/>
<!-- 录入信息 -->
<include file="com/zxd/autocontrol/entry/conf/Entry_Struts.xml"/>
<!-- 导入信息 By chuenux -->
<include file="com/zxd/autocontrol/autoimport/conf/Imp_Struts.xml"/>
</struts>
标签:des blog http ar io os 使用 sp for
原文地址:http://www.cnblogs.com/u0mo5/p/4168498.html