<?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.0.xsd">
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@10.10.3.237:1521:tarena</value>
</property>
<property name="username">
<value>openlab</value>
</property>
<property name="password">
<value>open123</value>
</property>
</bean>
<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>domain/User.hbm.xml</value>
<value>domain/ServiceAccount.hbm.xml</value>
<value>domain/Pricing.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="userDao" class="dao.UserDaoHibernateImpl">
<property name="sessionFactory">
<ref local="mySessionFactory" />
</property>
</bean>
<bean id="myTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="mySessionFactory" />
</property>
</bean>
<bean id="userServiceTarget"
class="service.UserServiceSpringImpl">
<property name="userDao">
<ref local="userDao" />
</property>
</bean>
<bean id="userService"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>service.UserService</value>
</property>
<property name="transactionManager">
<ref bean="myTransactionManager" />
</property>
<property name="target">
<ref bean="userServiceTarget" />
</property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<bean name="LoginAction" class="actions.LoginAction">
</bean>
<bean name="BillDetailQueryAction" class="actions.BillDetailQueryAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="DefaultBillQueryAction" class="actions.DefaultBillQueryAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="ModifyUserAction" class="actions.ModifyUserAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="SpecifiedAccountBillQueryAction" class="actions.SpecifiedAccountBillQueryAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
<bean name="SpecifiedBillQueryAction" class="actions.SpecifiedBillQueryAction">
<property name="userService">
<ref local="userService" />
</property>
</bean>
</beans>
评论2