ssh的applicationContext.xml配置
<?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.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- oracle数据源配置 start-->
<bean id="dataSource"
value="crmadmin"></property>
<property name="password" value="admin"></property>
</bean>
<!-- oracle数据源配置 end-->
<!-- hibernate sessionFactory配置 start-->
<bean id="sessionFactory"
/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/topthink/crm/entity/BasDict.hbm.xml</value>
<value>
com/topthink/crm/entity/CstCustomer.hbm.xml
</value>
<value>
com/topthink/crm/entity/CstActivity.hbm.xml
</value>
<value>com/topthink/crm/entity/CstLost.hbm.xml</value>
<value>
com/topthink/crm/entity/CstService.hbm.xml
</value>
<value>
com/topthink/crm/entity/CstLinkman.hbm.xml
</value>
<value>com/topthink/crm/entity/Orders.hbm.xml</value>
<value>
com/topthink/crm/entity/OrdersLine.hbm.xml
</value>
<value>com/topthink/crm/entity/Product.hbm.xml</value>
<value>com/topthink/crm/entity/Storage.hbm.xml</value>
<value>com/topthink/crm/entity/SalChance.hbm.xml</value>
<value>com/topthink/crm/entity/SalPlan.hbm.xml</value>
<value>com/topthink/crm/entity/SysRight.hbm.xml</value>
<value>com/topthink/crm/entity/SysRole.hbm.xml</value>
<value>com/topthink/crm/entity/SysUser.hbm.xml</value>
<value>
com/topthink/crm/entity/SysRoleRight.hbm.xml
</value>
<value>com/topthink/crm/entity/Callback.hbm.xml</value>
</list>
</property>
</bean>
<!-- hibernate sessionFactory配置 end-->
<!-- spring配置aop start-->
<bean id="transactionManager"
ref="sessionFactory" />
</bean>
<tx:advice id="transactionAdvice"
transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="upd*" propagation="REQUIRED" />
<tx:method name="get*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="transactionPointCut"
expression="execution(* com.topthink.crm.service.*.*(..))" />
<aop:advisor advice-ref="transactionAdvice"
pointcut-ref="transactionPointCut" />
</aop:config>
<!-- sping配置aop end-->
<!-- 管理DAO start-->
<bean id="objectDAO"
ref="sessionFactory" />
<property name="observice" ref="objectService"></property>
</bean>
<!-- 管理DAO end-->
<!-- 管理Service start-->
<bean id="objectService"
ref="objectDAO" />
</bean>
<!-- 管理Service end-->
<!-- 管理Action start-->
<bean id="objectAction"
ref="objectService" />
</bean>
<!-- 管理Action end-->
</beans>