applicationContext.xml 3.46 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:task="http://www.springframework.org/schema/task" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">

<!-- 采用注释的方式配置bean -->
<context:annotation-config/>

<!-- 配置要扫描的包 -->
<context:component-scan base-package="com.lyms.platform.biz.service"/>
<context:component-scan base-package="com.lyms.hospitalapi"/>
<!-- 配置要扫描的包 -->
<context:component-scan base-package="com.lyms.platform.biz.dal.impl"/>
<context:component-scan base-package="com.lyms.platform.operate.web.facade"/>
<context:component-scan base-package="com.lyms.platform.operate.web.service"/>
<context:component-scan base-package="com.lyms.platform.permission.*"/>
<context:component-scan base-package="com.lymsh.platform.reportdata.model.*" />
<context:component-scan base-package="com.lymsh.platform.reportdata.dao" />
<context:component-scan base-package="com.lymsh.platform.reportdata.service" />
<!-- 提示信息加载类 -->
<bean class="com.lyms.platform.common.core.resolve.MessageResolver">
<property name="messageFile" value="message.properties"/>
</bean>
<import resource="classpath:/spring/applicationContext_biz_patient.xml"/>
<import resource="classpath:/spring/spring-mongodb.xml"/>
<import resource="classpath:/spring/applicationContext-dal.xml"/>
<!--医院单机版的时候需要打开
<import resource="classpath:/spring/applicationContext-slave.xml"/>-->

<task:annotation-driven/>

<!--<task:scheduled-tasks>-->
<!--<task:scheduled ref="syncDataTaskService" method="syncData" cron="0 0/10 * * * ?"/>-->
<!--</task:scheduled-tasks>-->

<bean id="sessionProvider" class="com.lyms.platform.operate.web.session.SessionProvider">
<property name="iSessionProviderMap">
<map>
<entry key="1" value-ref="localSession"/>
<entry key="2" value-ref="usSession"/>
</map>
</property>
<property name="defaultSessionProvider" ref="localSession"/>
<property name="currentStrateger" value="${run.mode}"/>
</bean>
<bean id="localSession" class="com.lyms.platform.operate.web.session.strategy.LocalCacheSessionStrategy"/>
<bean id="usSession" class="com.lyms.platform.operate.web.session.strategy.UserCenterStrategy"/>
</beans>