12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?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:jaxws="http://cxf.apache.org/jaxws"
- xmlns:jaxrs="http://cxf.apache.org/jaxrs"
- xmlns:cxf="http://cxf.apache.org/core"
- xmlns:util="http://www.springframework.org/schema/util"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:task="http://www.springframework.org/schema/task"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.1.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
- http://www.springframework.org/schema/task
- http://www.springframework.org/schema/task/spring-task-4.1.xsd
- http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
- http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
- http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util-3.0.xsd
- ">
- <context:property-placeholder location="classpath:system.properties" />
-
- <import resource="druid.xml"/>
- <import resource="spring-redis.xml"/>
-
- <import resource="classpath:META-INF/cxf/cxf.xml" />
-
- <jaxws:endpoint id="userService"
- implementor="org.cs.webservice.impl.UserServiceImpl"
- address="/userWS">
- </jaxws:endpoint>
-
- <!-- 支持异步方法执行 -->
- <task:annotation-driven />
- <bean id="sessionFactory"
- class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource"></property>
- <property name="packagesToScan">
- <list>
- <value>org.cs.core</value>
- <value>org.cs.mgr</value>
- <value>org.cs.web</value>
- <value>org.cs.ws</value>
- <value>org.cs.notify</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.show_sql">true</prop>
- <prop key="hibernate.format_sql">true</prop>
- <prop key="hibernate.hbm2ddl.auto">update</prop> <!-- none validate -->
- <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
- </props>
- </property>
- <property name="entityInterceptor">
- <bean id="entityInterceptor" class="org.cs.core.interceptor.EntityInterceptor" />
- </property>
- </bean>
- <!-- 配置事务管理 -->
- <bean id="transactionManager"
- class="org.springframework.orm.hibernate4.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
- <!-- 配置注解实现管理事务(cglib:proxy-target-class="true") -->
- <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />
- <bean id="hibernateTemplate" class="org.springframework.orm.hibernate4.HibernateTemplate">
- <property name="sessionFactory" ref="sessionFactory"></property>
- </bean>
- <bean id="jdbcTemplate" class="org.cs.core.dao.impl.MyJdbcTemplate">
- <property name="dataSource" ref="dataSource"></property>
- </bean>
- <!-- 使用 annotation -->
- <context:annotation-config />
-
- <context:component-scan base-package="org.cs" >
- <!-- <context:exclude-filter type="annotation" -->
- <!-- expression="org.springframework.stereotype.Controller" /> -->
- </context:component-scan>
- <bean id="springContextHolder" class="org.cs.core.util.SpringUtil" />
-
- <!-- 当Spring容器启动完成后执行下面的这个Bean -->
- <bean class="org.cs.core.util.DataSourceInitListener" />
-
- </beans>
|