67,513
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!-- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:sqlserver://192.168.4.241:1433;databaseName=DataCollect;</value>
</property>
<property name="username">
<value>ondemand</value>
</property>
<property name="password">
<value>ondemand</value>
</property>
</bean>-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://127.0.0.1:3306/enterpriser</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>root</value>
</property>
<property name="maxIdle">
<value>10</value>
</property>
<property name="minIdle">
<value>2</value>
</property>
<property name="testOnBorrow">
<value>true</value>
</property>
<property name="testWhileIdle">
<value>true</value>
</property>
<property name="validationQuery">
<value>select 1 from dual</value>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>com/zeroglobal/common/hibernate/ZwMeeting.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwCode.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwMetCalendar.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwWordOnline.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwReply.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwUser.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwCalendarDatum.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwCalendarUser.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwPhoto.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwMetSupport.hbm.xml</value>
<value>com/zeroglobal/common/hibernate/ZwUserBasic.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="transactionCglibProxyFactoryBean" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="proxyTargetClass" value="true" />
<property name="transactionAttributes">
<props>
<prop key="getCurrentSession">PROPAGATION_NOT_SUPPORTED</prop>
<prop key="getORMProvider">PROPAGATION_NOT_SUPPORTED</prop>
<prop key="getEntityClass">PROPAGATION_NOT_SUPPORTED</prop>
<prop key="getJdbcTemplate">PROPAGATION_NOT_SUPPORTED</prop>
<prop key="getService">PROPAGATION_NOT_SUPPORTED</prop>
<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="count*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="evict">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="refresh">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="flush">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="clear">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
</beans>