3.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" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- 使用annotation 自动注册bean,并检查@Required,@Autowired的属性已被注入 -->
<context:component-scan base-package="com.huawei.support">
<context:include-filter type="annotation"
expression="org.aspectj.lang.annotation.Aspect" />
</context:component-scan>
<!-- 使用annotation定义事务 -->
<tx:annotation-driven transaction-manager="transactionManager"
proxy-target-class="false" />
<!-- 使用注解定义切面 -->
<aop:aspectj-autoproxy proxy-target-class="true" />
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:proxool.properties</value>
</list>
</property>
</bean>
<bean id="dbUserInfo" class="com.huawei.support.dao.DBUserInfo">
</bean>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver" value="${proxool.driver}" />
<property name="driverUrl" value="${proxool.url}" />
<property name="user" value="${proxool.username}" />
<property name="password">
<bean id="dbUserInfo.mPassword"
class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
</property>
<property name="alias" value="${proxool.alias}" />
<property name="prototypeCount" value="${proxool.prototypeCount}" />
<property name="maximumConnectionCount" value="${proxool.maximumConnectionCount}" />
<property name="minimumConnectionCount" value="${proxool.minimumConnectionCount}" />
<property name="trace" value="${proxool.trace}" />
<property name="verbose" value="${proxool.verbose}" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sql-map-config.xml" />
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations">
<value>classpath:com/huawei/support/**/orm/*.xml</value>
</property>
</bean>
<jaxws:endpoint id="navigationWS" implementor="#navigationWsImpl"
address="/navigationWS">
</jaxws:endpoint>
<jaxws:endpoint id="downLoadWS" implementor="#downLoadWsImpl"
address="/downLoadWS">
</jaxws:endpoint>
<!-- Hedex权限验证和定时获取服务 -->
<jaxws:endpoint id="hdxDocInfWS" implementor="#hdxDocInfWSImpl"
address="/hdxDocInfService">
</jaxws:endpoint>
</beans>
<?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" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- 使用annotation 自动注册bean,并检查@Required,@Autowired的属性已被注入 -->
<context:component-scan base-package="com.huawei.support">
<context:include-filter type="annotation"
expression="org.aspectj.lang.annotation.Aspect" />
</context:component-scan>
<!-- 使用annotation定义事务 -->
<tx:annotation-driven transaction-manager="transactionManager"
proxy-target-class="false" />
<!-- 使用注解定义切面 -->
<aop:aspectj-autoproxy proxy-target-class="true" />
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:proxool.properties</value>
</list>
</property>
</bean>
<bean id="dbUserInfo" class="com.huawei.support.dao.DBUserInfo">
</bean>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver" value="${proxool.driver}" />
<property name="driverUrl" value="${proxool.url}" />
<property name="user" value="${proxool.username}" />
<property name="password">
<bean id="dbUserInfo.mPassword"
class="org.springframework.beans.factory.config.PropertyPathFactoryBean" />
</property>
<property name="alias" value="${proxool.alias}" />
<property name="prototypeCount" value="${proxool.prototypeCount}" />
<property name="maximumConnectionCount" value="${proxool.maximumConnectionCount}" />
<property name="minimumConnectionCount" value="${proxool.minimumConnectionCount}" />
<property name="trace" value="${proxool.trace}" />
<property name="verbose" value="${proxool.verbose}" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sql-map-config.xml" />
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations">
<value>classpath:com/huawei/support/**/orm/*.xml</value>
</property>
</bean>
<jaxws:endpoint id="navigationWS" implementor="#navigationWsImpl"
address="/navigationWS">
</jaxws:endpoint>
<jaxws:endpoint id="downLoadWS" implementor="#downLoadWsImpl"
address="/downLoadWS">
</jaxws:endpoint>
<!-- Hedex权限验证和定时获取服务 -->
<jaxws:endpoint id="hdxDocInfWS" implementor="#hdxDocInfWSImpl"
address="/hdxDocInfService">
</jaxws:endpoint>
</beans>