<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- DataSource Configurer -->
<!--PropertyPlaceholderConfigurer实现了BeanFactoryPostProcessor,将配置信息配置在property文件中 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/system-config.properties" />
</bean>
<!-- C3P0 DataSource -->
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource"
lazy-init="false">
<property name="driver">
<value>${jdbc.driverClassName}</value>
</property>
<property name="driverUrl">
<value>${jdbc.url}</value>
</property>
<property name="user">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="maximumConnectionCount">
<value>${jdbc.maximumConnectionCount}</value>
</property>
<!--
<property name="houseKeepingSleepTime">
<value>${jdbc.houseKeepingSleepTime}</value>
</property>
-->
<property name="houseKeepingTestSql">
<value>${jdbc.houseKeepingTestSql}</value>
</property>
<property name="testBeforeUse">
<value>${jdbc.testBeforeUse}</value>
</property>
<property name="alias">
<value>${jdbc.alias}</value>
</property>
<property name="simultaneousBuildThrottle">
<value>${jdbc.simultaneousBuildThrottle}</value>
</property>
<property name="trace">
<value>${jdbc.trace}</value>
</property>
</bean>
<!--
Hibernate SessionFactory Automatically validate or export schema DDL
to the database when the SessionFactory is created. With create-drop,
the database schema will be dropped when the SessionFactory is closed
explicitly. eg. validate | update | create | create-drop <prop
key="hibernate.hbm2ddl.auto">update</prop>
-->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<!-- 设置与表格的映射文件 -->
<value>
com/jsict/gcfm/vo/TArea.hbm.xml,
com/jsict/gcfm/vo/TDepart.hbm.xml,
com/jsict/gcfm/vo/TMatGoodsList.hbm.xml,
com/jsict/gcfm/vo/TMatticket.hbm.xml,
com/jsict/gcfm/vo/TMbrTerList.hbm.xml,
com/jsict/gcfm/vo/TMember.hbm.xml,
com/jsict/gcfm/vo/TMessage.hbm.xml,
com/jsict/gcfm/vo/TPhoto.hbm.xml,
com/jsict/gcfm/vo/TPresent.hbm.xml,
com/jsict/gcfm/vo/TProduct.hbm.xml,
com/jsict/gcfm/vo/TrBigdategoods.hbm.xml,
com/jsict/gcfm/vo/TrCompetitioninfo.hbm.xml,
com/jsict/gcfm/vo/TrMaterial.hbm.xml,
com/jsict/gcfm/vo/TrOrder.hbm.xml,
com/jsict/gcfm/vo/TrOrdGoodsList.hbm.xml,
com/jsict/gcfm/vo/TrReturngoods.hbm.xml,
com/jsict/gcfm/vo/TrRtnGoodsList.hbm.xml,
com/jsict/gcfm/vo/TrSaleAll.hbm.xml,
com/jsict/gcfm/vo/TrSaleSingle.hbm.xml,
com/jsict/gcfm/vo/TrStock.hbm.xml,
com/jsict/gcfm/vo/TTerminal.hbm.xml,
com/jsict/gcfm/vo/TOperatelog.hbm.xml,
com/jsict/gcfm/vo/TMessageStatus.hbm.xml,
com/jsict/gcfm/vo/TSystem.hbm.xml
</value>
</property>
<property name="hibernateProperties">
<!-- hibernate 配置的属性 -->
<props>
<prop key="hibernate.dialect">
${hibernate.dialect}
</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.connection.autocommit">false</prop>
<prop key="hibernate.connection.release_mode">after_statement</prop>
<prop key="hibernate.cache.use_second_level_cache">false</prop>
<prop key="hibernate.max_fetch_depth">15</prop>
</props>
</property>
<property name="eventListeners">
<map>
<entry key="merge">
<bean
class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" />
</entry>
</map>
</property>
</bean>
<!-- hibernate 事务管理器 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- hibernate 申明式事务管理配置 -->
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributeSource">
<value>
<!--
com.jsict.gcfm.demo.TestAction.find*=PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-ESPException,-RuntimeException
-->
com.jsict.gcfm.goodsmgr.ordermanage.OrderManageService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.ordermanage.OrderManageService.saveOrder=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.returnedgoods.ReturnedGoodsService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.returnedgoods.ReturnedGoodsService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.ordersummarize.OrderSummarizeService.upload*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.notic.NoticMessageService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.terminal.TerminalService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.terminal.TerminalService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.terminal.TerminalService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.employee.EmployeeService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.employee.EmployeeService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.employee.EmployeeService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.product.ProductService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.product.ProductService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.product.ProductService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.product.ProductService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.product.ProductService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.present.PresentService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.present.PresentService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.present.PresentService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.present.PresentService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.basicinfo.present.PresentService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleSingleService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleSingleService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleSingleService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleSingleService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleSingleService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleAllService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleAllService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleAllService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleAllService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.salesvolume.SaleAllService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.material.MaterialService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.material.MaterialService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.material.MaterialService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.material.MaterialService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.material.MaterialService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.competitiveinfo.CompetitiveinfoService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.competitiveinfo.CompetitiveinfoService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.competitiveinfo.CompetitiveinfoService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.competitiveinfo.CompetitiveinfoService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.datalist.competitiveinfo.CompetitiveinfoService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.stock.StockService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.stock.StockService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.stock.StockService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.stock.StockService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.goodsmgr.stock.StockService.find*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.photosmanage.PhotosmanageService.create*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.photosmanage.PhotosmanageService.delete*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.photosmanage.PhotosmanageService.update*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.photosmanage.PhotosmanageService.search*=PROPAGATION_REQUIRED,-gcfmException
com.jsict.gcfm.terminal.photosmanage.PhotosmanageService.find*=PROPAGATION_REQUIRED,-gcfmException
</value>
</property>
</bean>
<bean
class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
</bean>
<bean
class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
<property name="transactionInterceptor" ref="transactionInterceptor" />
</bean>
<!-- Hibernate 3.0's JMX statistics service -->
<!-- Implements the StatisticsServiceMBean management interface -->
<bean name="broadengate:type=HibernateStatistics" class="org.hibernate.jmx.StatisticsService">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="baseAction" abstract="true" class="com.jsict.gcfm.BaseAction"
init-method="init">
<!--
可以初始化所有action公用的内容 <property name="logService" ref="logService" />
-->
<property name="pageSize">
<value>${pagemax}</value>
</property>
<property name="productService" ref="productService" />
<property name="employeeService" ref="employeeService" />
<property name="terminalService" ref="terminalService" />
<property name="departmentService" ref="departmentService" />
<property name="areaService" ref="areaService" />
</bean>
<import resource="/spring/applicationContext-competitiveinfo.xml" />
<import resource="/spring/applicationContext-photosmanage.xml" />
<import resource="/spring/applicationContext-salesvolume.xml" />
<import resource="/spring/applicationContext-present.xml" />
<import resource="/spring/applicationContext-product.xml" />
<import resource="/spring/applicationContext-ordermanage.xml" />
<import resource="/spring/applicationContext-ordersummarize.xml" />
<import resource="/spring/applicationContext-orderreach.xml" />
<import resource="/spring/applicationContext-returnedgoods.xml" />
<import resource="/spring/applicationContext-returnedsummarize.xml" />
<import resource="/spring/applicationContext-returnedreply.xml" />
<import resource="/spring/applicationContext-login.xml" />
<import resource="/spring/applicationContext-logdb.xml" />
<import resource="/spring/applicationContext-noticmessage.xml" />
<import resource="/spring/applicationContext-material.xml" />
<import resource="/spring/applicationContext-area.xml" />
<import resource="/spring/applicationContext-department.xml" />
<import resource="/spring/applicationContext-employee.xml" />
<import resource="/spring/applicationContext-terminal.xml" />
<import resource="/spring/applicationContext-system.xml" />
<import resource="/spring/applicationContext-stock.xml" />
</beans>
spring applicationcontext配置
最新推荐文章于 2025-02-05 10:22:40 发布