Commit 11b0323c by s_guodong

update

parent 089a82bc
......@@ -89,6 +89,20 @@
<scope>system</scope>
<systemPath>${pom.basedir}/lib/jrxx.jar</systemPath>
</dependency>
<dependency>
<groupId>com.brilliance</groupId>
<artifactId>eibs-ext</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/eibs-ext.jar</systemPath>
</dependency>
<dependency>
<groupId>com.brilliance</groupId>
<artifactId>eibs-container</artifactId>
<version>3.5.0</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/eibs-container-3.5.0.jar</systemPath>
</dependency>
</dependencies>
<build>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -89,6 +89,181 @@ spring:
driver-class-name: com.mysql.jdbc.Driver
eibs:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://192.168.0.110:55435/eibs?useUnicode=true&amp;characterEncoding=UTF-8
username: postgres
password: postgres
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
# druid 配置: https://github.com/alibaba/druid/wiki/
#初始化链接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
filters: stat,slf4j
#,wall
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 合并多个DruidDataSource的监控数据
useGlobalDataSourceStat: false
swd:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://192.168.0.110:55435/swd?useUnicode=true&amp;characterEncoding=UTF-8
username: postgres
password: postgres
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
# druid 配置: https://github.com/alibaba/druid/wiki/
#初始化链接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
filters: stat,slf4j
#,wall
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 合并多个DruidDataSource的监控数据
useGlobalDataSourceStat: false
fxd:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://192.168.0.110:55435/fxd?useUnicode=true&amp;characterEncoding=UTF-8
username: postgres
password: postgres
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
# druid 配置: https://github.com/alibaba/druid/wiki/
#初始化链接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
filters: stat,slf4j
#,wall
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 合并多个DruidDataSource的监控数据
useGlobalDataSourceStat: false
erd:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://192.168.0.110:55435/erd?useUnicode=true&amp;characterEncoding=UTF-8
username: postgres
password: postgres
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
# druid 配置: https://github.com/alibaba/druid/wiki/
#初始化链接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
filters: stat,slf4j
#,wall
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 合并多个DruidDataSource的监控数据
useGlobalDataSourceStat: false
ryd:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://192.168.0.110:55435/ryd?useUnicode=true&amp;characterEncoding=UTF-8
username: postgres
password: postgres
type: com.alibaba.druid.pool.DruidDataSource
# 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大
# druid 配置: https://github.com/alibaba/druid/wiki/
#初始化链接数
initialSize: 1
minIdle: 1
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# validationQuery: select 1 from dual
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
# 打开PSCache,并且指定每个连接上PSCache的大小
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
# 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
filters: stat,slf4j
#,wall
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 合并多个DruidDataSource的监控数据
useGlobalDataSourceStat: false
envConfig:
rootPath: workRoot
cache:
......
......@@ -38,6 +38,10 @@
<artifactId>gjjs-bd-runtime</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -41,16 +41,73 @@ public class DataSourceConfiguration {
return new DruidDataSource();
}
/**
* 数据源eibs
*/
@Bean(name = "eibs")
@Qualifier("eibs")
@ConfigurationProperties(prefix = "spring.eibs")
public DruidDataSource eibs() {
return new DruidDataSource();
}
/**
* 数据源swd
*/
@Bean(name = "swd")
@Qualifier("swd")
@ConfigurationProperties(prefix = "spring.swd")
public DruidDataSource swd() {
return new DruidDataSource();
}
/**
* 数据源fxd
*/
@Bean(name = "fxd")
@Qualifier("fxd")
@ConfigurationProperties(prefix = "spring.fxd")
public DruidDataSource fxd() {
return new DruidDataSource();
}
/**
* 数据源erd
*/
@Bean(name = "erd")
@Qualifier("erd")
@ConfigurationProperties(prefix = "spring.erd")
public DruidDataSource erd() {
return new DruidDataSource();
}
/**
* 数据源ryd
*/
@Bean(name = "ryd")
@Qualifier("ryd")
@ConfigurationProperties(prefix = "spring.ryd")
public DruidDataSource ryd() {
return new DruidDataSource();
}
@Bean(name = "dynamicDataSource")
@Primary
public DataSource dynamicDataSource() {
DynamicDataSource dynamicDataSource = new DynamicDataSource();
dynamicDataSource.myMap = new HashMap<>(2);
dynamicDataSource.myMap = new HashMap<>();
dynamicDataSource.myMap.put("datasource1", datasource1());
dynamicDataSource.myMap.put("datasource2", datasource2());
dynamicDataSource.myMap.put("eibs", eibs());
dynamicDataSource.myMap.put("swd", swd());
dynamicDataSource.myMap.put("fxd", fxd());
dynamicDataSource.myMap.put("erd", erd());
dynamicDataSource.myMap.put("ryd", ryd());
dynamicDataSource.setTargetDataSources(dynamicDataSource.myMap);
dynamicDataSource.setDefaultTargetDataSource(datasource1());
dynamicDataSource.setDefaultTargetDataSource(eibs());
DynamicDataSourceContextHolder.dataSourceIds.addAll(dynamicDataSource.myMap.keySet());
return dynamicDataSource;
}
......
......@@ -81,11 +81,11 @@ public class MdaContext implements IContext {
// this.emmiter = emitter;
// }
public IDaoSession getDaoSession() {
return daoSession;
return daoSession == null ? MdaEnv.getBean(IDaoSession.class) : daoSession;
}
public EnvConfig getEnvConfig() {
return config;
return config == null ? MdaEnv.getBean(EnvConfig.class) : config;
}
public String getTransName() {
......@@ -235,7 +235,7 @@ public class MdaContext implements IContext {
}
public ILocker getLocker() {
return this.locker;
return this.locker == null ? MdaEnv.getBean(ILocker.class) : this.locker;
}
@Override
......
......@@ -56,6 +56,7 @@
<slf4j.api.version>1.7.25</slf4j.api.version>
<spring.context.version>5.2.9.RELEASE</spring.context.version>
<fastjson.version>1.2.53</fastjson.version>
<postgresql.version>42.2.19</postgresql.version>
</properties>
<dependencyManagement>
......@@ -114,6 +115,12 @@
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.spring.boot.starter.version}</version>
</dependency>
<!--postgres驱动-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment