Commit 62afc7f9c69fd2290dc6158f498002824aa1e2ca
1 parent
3810b54d39
Exists in
master
and in
8 other branches
修改新电子病历
Showing 4 changed files with 63 additions and 57 deletions
platform-operate-api/src/main/resources/database.properties
View file @
62afc7f
platform-operate-api/src/main/resources/spring/applicationContext-dal.xml
View file @
62afc7f
| ... | ... | @@ -45,62 +45,6 @@ |
| 45 | 45 | </bean> |
| 46 | 46 | <!--我们自己的公网服务器库 end--> |
| 47 | 47 | |
| 48 | - <!-- 配置数据源 --> | |
| 49 | - <bean name="dataSourceB" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> | |
| 50 | - <property name="url" value="${mysql.slave.jdbcurl}"/> | |
| 51 | - <property name="username" value="${mysql.slave.db.name}"/> | |
| 52 | - <property name="password" value="${mysql.slave.db.password}"/> | |
| 53 | - <property name="initialSize" value="10"/> | |
| 54 | - <property name="maxActive" value="100"/> | |
| 55 | - <property name="maxIdle" value="10"/> | |
| 56 | - <property name="minIdle" value="0"/> | |
| 57 | - <property name="maxWait" value="10000"/> | |
| 58 | - <!-- <property name="validationQuery" value="${validationQuery3}" /> --> | |
| 59 | - <property name="testOnBorrow" value="false"/> | |
| 60 | - <property name="testOnReturn" value="false"/> | |
| 61 | - <property name="testWhileIdle" value="true"/> | |
| 62 | - <property name="timeBetweenEvictionRunsMillis" value="60000"/> | |
| 63 | - <property name="minEvictableIdleTimeMillis" value="25200000"/> | |
| 64 | - <property name="removeAbandoned" value="true"/> | |
| 65 | - <property name="removeAbandonedTimeout" value="1800"/> | |
| 66 | - <property name="logAbandoned" value="true"/> | |
| 67 | - <property name="filters" value="stat"/> | |
| 68 | - </bean> | |
| 69 | - | |
| 70 | - | |
| 71 | - <bean id="mainJdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate" | |
| 72 | - p:dataSource-ref="dataSourceB"/> | |
| 73 | - | |
| 74 | - <bean id="mainSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> | |
| 75 | - <property name="dataSource" ref="dataSourceB"/> | |
| 76 | - <property name="mapperLocations"> | |
| 77 | - <list> | |
| 78 | - <value>classpath*:mainOrm/slave/*.xml</value> | |
| 79 | - </list> | |
| 80 | - </property> | |
| 81 | - </bean> | |
| 82 | - | |
| 83 | - <!-- all class in the back-package are auto loaded as a mapper --> | |
| 84 | - <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> | |
| 85 | - <property name="sqlSessionFactoryBeanName" value="mainSqlSessionFactory"></property> | |
| 86 | - <property name="basePackage" value="com.lyms.platform.permission.dao.slave"/> | |
| 87 | - </bean> | |
| 88 | - | |
| 89 | - | |
| 90 | - <!-- manage transaction | |
| 91 | - <bean id="mainTransactionManager" | |
| 92 | - class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> | |
| 93 | - <property name="dataSource" ref="dataSourceB"/> | |
| 94 | - </bean> | |
| 95 | - | |
| 96 | - <tx:annotation-driven transaction-manager="mainTransactionManager"/> --> | |
| 97 | - | |
| 98 | - <!-- Mabatis Data Layer --> | |
| 99 | - <bean id="mainSqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate"> | |
| 100 | - <constructor-arg index="0" ref="mainSqlSessionFactory"/> | |
| 101 | - </bean> | |
| 102 | - | |
| 103 | - | |
| 104 | 48 | <!-- DataSource configuration 数据仓库主数据库 --> |
| 105 | 49 | <bean id="reportDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> |
| 106 | 50 | <property name="driverClass" value="${report.driver}"/> |
platform-operate-api/src/main/resources/spring/applicationContext-slave.xml
View file @
62afc7f
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<beans xmlns="http://www.springframework.org/schema/beans" | |
| 3 | + xmlns:p="http://www.springframework.org/schema/p" | |
| 4 | + xmlns:tx="http://www.springframework.org/schema/tx" | |
| 5 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 6 | + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
| 7 | + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd"> | |
| 8 | + | |
| 9 | + | |
| 10 | + <bean name="dataSourceB" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> | |
| 11 | + <property name="url" value="${mysql.slave.jdbcurl}"/> | |
| 12 | + <property name="username" value="${mysql.slave.db.name}"/> | |
| 13 | + <property name="password" value="${mysql.slave.db.password}"/> | |
| 14 | + <property name="initialSize" value="10"/> | |
| 15 | + <property name="maxActive" value="100"/> | |
| 16 | + <property name="maxIdle" value="10"/> | |
| 17 | + <property name="minIdle" value="0"/> | |
| 18 | + <property name="maxWait" value="10000"/> | |
| 19 | + <property name="testOnBorrow" value="false"/> | |
| 20 | + <property name="testOnReturn" value="false"/> | |
| 21 | + <property name="testWhileIdle" value="true"/> | |
| 22 | + <property name="timeBetweenEvictionRunsMillis" value="60000"/> | |
| 23 | + <property name="minEvictableIdleTimeMillis" value="25200000"/> | |
| 24 | + <property name="removeAbandoned" value="true"/> | |
| 25 | + <property name="removeAbandonedTimeout" value="1800"/> | |
| 26 | + <property name="logAbandoned" value="true"/> | |
| 27 | + <property name="filters" value="stat"/> | |
| 28 | + </bean> | |
| 29 | + | |
| 30 | + | |
| 31 | + <bean id="mainJdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate" | |
| 32 | + p:dataSource-ref="dataSourceB"/> | |
| 33 | + | |
| 34 | + <bean id="mainSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> | |
| 35 | + <property name="dataSource" ref="dataSourceB"/> | |
| 36 | + <property name="mapperLocations"> | |
| 37 | + <list> | |
| 38 | + <value>classpath*:mainOrm/slave/*.xml</value> | |
| 39 | + </list> | |
| 40 | + </property> | |
| 41 | + </bean> | |
| 42 | + | |
| 43 | + <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> | |
| 44 | + <property name="sqlSessionFactoryBeanName" value="mainSqlSessionFactory"></property> | |
| 45 | + <property name="basePackage" value="com.lyms.platform.permission.dao.slave"/> | |
| 46 | + </bean> | |
| 47 | + | |
| 48 | + | |
| 49 | + <bean id="mainTransactionManager" | |
| 50 | + class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> | |
| 51 | + <property name="dataSource" ref="dataSourceB"/> | |
| 52 | + </bean> | |
| 53 | + | |
| 54 | + <tx:annotation-driven transaction-manager="mainTransactionManager"/> | |
| 55 | + | |
| 56 | + <bean id="mainSqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate"> | |
| 57 | + <constructor-arg index="0" ref="mainSqlSessionFactory"/> | |
| 58 | + </bean> | |
| 59 | +</beans> |
platform-operate-api/src/main/resources/spring/applicationContext.xml
View file @
62afc7f
| ... | ... | @@ -26,6 +26,9 @@ |
| 26 | 26 | <import resource="classpath:/spring/applicationContext_biz_patient.xml"/> |
| 27 | 27 | <import resource="classpath:/spring/spring-mongodb.xml"/> |
| 28 | 28 | <import resource="classpath:/spring/applicationContext-dal.xml"/> |
| 29 | + <!--医院单机版的时候需要打开 | |
| 30 | + <import resource="classpath:/spring/applicationContext-slave.xml"/>--> | |
| 31 | + | |
| 29 | 32 | |
| 30 | 33 | <bean id="sessionProvider" class="com.lyms.platform.operate.web.session.SessionProvider"> |
| 31 | 34 | <property name="iSessionProviderMap"> |