zoukankan      html  css  js  c++  java
  • 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: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.0.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    	<bean id="dataSource"
    		class="org.apache.commons.dbcp.BasicDataSource">
    		<property name="driverClassName"
    			value="oracle.jdbc.driver.OracleDriver">
    		</property>
    		<property name="url"
    			value="jdbc:oracle:thin:@10.6.78.7:1521:meterial">
    		</property>
    		<property name="username" value="plan"></property>
    		<property name="password" value="plan"></property>
    	</bean> 
    	<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
    		<property name="configLocation">
    			<value>classpath:SqlMapConfig.xml</value>
    		</property>
    		<property name="dataSource">
    			<ref local="dataSource" />
    		</property>
    	</bean>
    
    	<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="save*" propagation="REQUIRED" />
    			<tx:method name="del*" propagation="REQUIRED" />
    			<tx:method name="update*" propagation="REQUIRED" />
    			<tx:method name="*" read-only="true" />
    		</tx:attributes>
    	</tx:advice>
    
    	<aop:config>
    		<aop:pointcut id="allManagerMethod"
    			expression="execution(* byd.service.impl.*.*(..))" />
    		<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod" />
    	</aop:config>
    </beans>
    <?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.0.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
         <!-- 树 -->
    	<bean id="baseDao" class="byd.dao.CurdBaseDaoImpl">
    		<property name="sqlMapClient" ref="sqlMapClient" />
    	</bean>
    </beans>
     
    <?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.0.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
         <!-- 树 -->
         <bean id="baseService" class="byd.service.impl.ICrudBaseServiceImpl">
    		<property name="baseDao" ref="baseDao" />
    	</bean>
    </beans>
    
     
    <?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.0.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
         <!-- 树 -->
         <bean id="baseService" class="byd.service.impl.ICrudBaseServiceImpl">
    		<property name="baseDao" ref="baseDao" />
    	</bean>
    </beans>
    
     
    <?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.0.xsd
               http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
        <!-- 树 -->
    	<bean name="treeAction" class="byd.action.TreeAction" scope="prototype">
    		<property name="baseService" ref="baseService" />
    	</bean>
    	<!-- 用户管理 -->
    	<bean name="userAction" class="byd.action.UserAction" scope="prototype">
    		<property name="baseService" ref="baseService"/>
    	</bean>
    	<!-- 部门管理 -->
    	<bean name="deptAction" class="byd.action.DeptAction" scope="prototype">
    		<property name="baseService" ref="baseService"/>
    	</bean>
    	<!-- 项目管理 -->
    	<bean name="itemAction" class="byd.action.ItemAction" scope="prototype">
    		<property name="baseService" ref="baseService"/>
    	</bean>
    	<!-- 项目考核 -->
    	<bean name="itemCheckAction" class="byd.action.ItemCheckAction" scope="prototype">
    		<property name="baseService" ref="baseService"/>
    	</bean>
    </beans>
    
     
  • 相关阅读:
    CDH版本大数据集群下搭建的Hue详细启动步骤(图文详解)
    如何正确且成功破解跨平台数据库管理工具DbVisualizer?(图文详解)
    [转]【HTTP】Fiddler(二)
    [转]jQuery UI Dialog Modal Popup Yes No Confirm example in ASP.Net
    [转]artDialog
    [转]GridView排序——微软提供Sort
    [转]GridView中直接新增行、编辑和删除
    [转]asp.net的ajax以及json
    [转]JQuery Ajax 在asp.net中使用总结
    [转]Jquery easyui开启行编辑模式增删改操作
  • 原文地址:https://www.cnblogs.com/qq1988627/p/6606922.html
Copyright © 2011-2022 走看看