Commit 421be1cdbe27bff1a2fb9e5831db9b3aaae5d771
1 parent
3ad49e7650
Exists in
master
and in
6 other branches
etl配置文件抽取
Showing 4 changed files with 29 additions and 58 deletions
regional-etl/src/main/java/com/lyms/etl/service/impl/CouponServiceImpl.java
View file @
421be1c
regional-etl/src/main/resources/application-prod.yml
View file @
421be1c
| 1 | -server: | |
| 2 | - port: 8081 | |
| 3 | 1 | spring: |
| 4 | 2 | datasource: |
| 5 | 3 | url: jdbc:mysql://119.90.43.68:3307/platform?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 |
| ... | ... | @@ -7,28 +5,6 @@ |
| 7 | 5 | password: platform123 |
| 8 | 6 | driver-class-name: com.mysql.jdbc.Driver |
| 9 | 7 | |
| 10 | - type: com.alibaba.druid.pool.DruidDataSource | |
| 11 | - initialSize: 5 | |
| 12 | - minIdle: 5 | |
| 13 | - maxActive: 20 | |
| 14 | - maxWait: 60000 | |
| 15 | - timeBetweenEvictionRunsMillis: 60000 | |
| 16 | - minEvictableIdleTimeMillis: 300000 | |
| 17 | - validationQuery: SELECT 1 FROM DUAL | |
| 18 | - testWhileIdle: true | |
| 19 | - testOnBorrow: false | |
| 20 | - testOnReturn: false | |
| 21 | - poolPreparedStatements: true | |
| 22 | - maxPoolPreparedStatementPerConnectionSize: 20 | |
| 23 | - filters: stat,wall,log4j | |
| 24 | - useGlobalDataSourceStat: true | |
| 25 | - connectionProperties: | |
| 26 | - druid: | |
| 27 | - stat: | |
| 28 | - mergeSql: true | |
| 29 | - druid: | |
| 30 | - stat: | |
| 31 | - slowSqlMillis: 5000 | |
| 32 | 8 | data: |
| 33 | 9 | mongodb: |
| 34 | 10 | host: 119.90.57.26 |
| ... | ... | @@ -38,7 +14,4 @@ |
| 38 | 14 | password: platform123 |
| 39 | 15 | profiles: |
| 40 | 16 | active: etl |
| 41 | -mybatis: | |
| 42 | - typeAliasesPackage: com.lyms.etl.model | |
| 43 | - mapperLocations: classpath:mappers/*.xml |
regional-etl/src/main/resources/application.properties
View file @
421be1c
| 1 | +server.port=8089 | |
| 2 | + | |
| 3 | +# druid | |
| 4 | +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource | |
| 5 | +spring.datasource.initialSize=5 | |
| 6 | +spring.datasource.minIdle=5 | |
| 7 | +spring.datasource.maxActive=20 | |
| 8 | +spring.datasource.maxWait=60000 | |
| 9 | +spring.datasource.timeBetweenEvictionRunsMillis=60000 | |
| 10 | +spring.datasource.minEvictableIdleTimeMillis=300000 | |
| 11 | +spring.datasource.validationQuery=SELECT 1 FROM DUAL | |
| 12 | +spring.datasource.testWhileIdle=true | |
| 13 | +spring.datasource.testOnBorrow=false | |
| 14 | +spring.datasource.testOnReturn=false | |
| 15 | +spring.datasource.poolPreparedStatements=true | |
| 16 | +spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 | |
| 17 | +spring.datasource.filters=stat,wall,log4j | |
| 18 | +spring.datasource.useGlobalDataSourceStat=true | |
| 19 | +spring.datasource.connectionProperties.druid.stat.mergeSql=true | |
| 20 | +spring.datasource.druid.stat.slowSqlMillis=5000 | |
| 21 | + | |
| 22 | +# mybatis | |
| 23 | +mybatis.typeAliasesPackage=com.lyms.etl.model | |
| 24 | +mybatis.mapperLocations=classpath:mappers/*.xml | |
| 25 | + | |
| 26 | +spring.profiles.active=prod,etl |
regional-etl/src/main/resources/application.yml
View file @
421be1c
| 1 | -server: | |
| 2 | - port: 8081 | |
| 3 | 1 | spring: |
| 4 | 2 | datasource: |
| 5 | 3 | url: jdbc:mysql://119.90.57.26:3306/platform |
| 6 | 4 | username: platform |
| 7 | 5 | password: platform123 |
| 8 | 6 | driver-class-name: com.mysql.jdbc.Driver |
| 9 | - | |
| 10 | - type: com.alibaba.druid.pool.DruidDataSource | |
| 11 | - initialSize: 5 | |
| 12 | - minIdle: 5 | |
| 13 | - maxActive: 20 | |
| 14 | - maxWait: 60000 | |
| 15 | - timeBetweenEvictionRunsMillis: 60000 | |
| 16 | - minEvictableIdleTimeMillis: 300000 | |
| 17 | - validationQuery: SELECT 1 FROM DUAL | |
| 18 | - testWhileIdle: true | |
| 19 | - testOnBorrow: false | |
| 20 | - testOnReturn: false | |
| 21 | - poolPreparedStatements: true | |
| 22 | - maxPoolPreparedStatementPerConnectionSize: 20 | |
| 23 | - filters: stat,wall,log4j | |
| 24 | - useGlobalDataSourceStat: true | |
| 25 | - connectionProperties: | |
| 26 | - druid: | |
| 27 | - stat: | |
| 28 | - mergeSql: true | |
| 29 | - druid: | |
| 30 | - stat: | |
| 31 | - slowSqlMillis: 5000 | |
| 7 | + | |
| 32 | 8 | data: |
| 33 | 9 | mongodb: |
| 34 | 10 | host: 119.90.57.26 |
| ... | ... | @@ -36,9 +12,4 @@ |
| 36 | 12 | database: platform |
| 37 | 13 | username: platform |
| 38 | 14 | password: platform123 |
| 39 | - profiles: | |
| 40 | - active: coupon | |
| 41 | -mybatis: | |
| 42 | - typeAliasesPackage: com.lyms.etl.model | |
| 43 | - mapperLocations: classpath:mappers/*.xml |