首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

spring资料基础配置

2013-08-10 
spring文件基础配置?xml version1.0 encodingUTF-8?!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN

spring文件基础配置

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans><bean id="propertyConfigurer"dependency-check="none"><property name="driverClass"><value>${jdbc.driver}</value></property><property name="jdbcUrl"><value>${jdbc.url}</value></property><property name="user"><value>${jdbc.username}</value></property><property name="password"><value>${jdbc.password}</value></property><property name="acquireIncrement"><value>${c3p0.acquireIncrement}</value></property><property name="initialPoolSize"><value>${c3p0.initialPoolSize}</value></property><property name="minPoolSize"><value>${c3p0.minPoolSize}</value></property><property name="maxPoolSize"><value>${c3p0.maxPoolSize}</value></property><property name="maxIdleTime"><value>${c3p0.maxIdleTime}</value></property><property name="idleConnectionTestPeriod"><value>${c3p0.idleConnectionTestPeriod}</value></property><property name="maxStatements"><value>${c3p0.maxStatements}</value></property><property name="numHelperThreads"><value>${c3p0.numHelperThreads}</value></property></bean><bean id="sessionFactory"/></property><property name="hibernateProperties"><props><prop key="hibernate.dialect">${hibernate.dialect}</prop><prop key="hibernate.show_sql">${hibernate.show_sql}</prop><!-- <prop key="hibernate.hbm2ddl.auto">update</prop> --><prop key="hibernate.jdbc.fetch_size">${hibernate.jdbc.fetch_size}</prop><prop key="hibernate.jdbc.batch_size">${hibernate.jdbc.batch_size}</prop><prop key="hibernate.connection.provider_class">net.sf.hibernate.connection.C3P0ConnectionProviderc3p0</prop><!-- <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop><prop key="hibernate.cache.use_second_level_cache">true</prop><prop key="hibernate.cache.use_query_cache">true</prop><prop key="hibernate.cache.provider_class">net.sf.hibernate.connection.C3P0ConnectionProviderc3p0</prop><prop key="hibernate.cache.provider_configuration_file_resource_path">/ehcache-hibernate.xml</prop> --></props></property><property name="eventListeners">                <map>                    <entry key="merge">                       <bean /></property></bean>//jdbc   sql <!--transactionManager--><bean id="transactionManager"ref="sessionFactory" /></bean><!-- 定义事务代理bean的模板 --><bean id="txProxyTemplate" lazy-init="true" abstract="true" /></property><property name="transactionAttributes"><props><prop key="save*">PROPAGATION_REQUIRED</prop><prop key="remove*">PROPAGATION_REQUIRED</prop><prop key="update*">PROPAGATION_REQUIRED</prop><prop key="get*">PROPAGATION_REQUIRED,readOnly</prop><prop key="*">PROPAGATION_REQUIRED</prop></props></property></bean></beans>



    <bean id="hibernateDaoSupport" abstract="true"><property name="sessionFactory" ref="sessionFactory"></property></bean><!-- sys start --><bean id="opinfoDao" parent="hibernateDaoSupport"/>



 <!-- sys start -->    <bean id="jtcyqkService" parent="txProxyTemplate"><property name="target"><bean class="com.web.sys.service.impl.JtcyqkServiceImpl"/></property></bean>

热点排行