From e637c368826168ac0b7fb8f2686d446de0eade45 Mon Sep 17 00:00:00 2001 From: zxm <154040976@qq.com> Date: Tue, 24 Apr 2018 23:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=9A=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 59 ++++++++++++++++++ .../src/main/resources/application-prod.yml | 59 ++++++++++++++++++ .../src/main/resources/application-test.yml | 59 ++++++++++++++++++ len-web/src/main/resources/application.yml | 60 +------------------ 4 files changed, 179 insertions(+), 58 deletions(-) create mode 100644 len-web/src/main/resources/application-dev.yml create mode 100644 len-web/src/main/resources/application-prod.yml create mode 100644 len-web/src/main/resources/application-test.yml diff --git a/len-web/src/main/resources/application-dev.yml b/len-web/src/main/resources/application-dev.yml new file mode 100644 index 0000000..96e0bdb --- /dev/null +++ b/len-web/src/main/resources/application-dev.yml @@ -0,0 +1,59 @@ +server: + port: 8081 +security: + basic: + enabled: false +spring: + datasource: + url: jdbc:mysql://localhost:3306/lenos?useUnicode=true&characterEncoding=UTF-8 + username: root + password: 123456 + # 使用druid数据源 + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + http: + encoding: + force: true + + +mybatis: + type-aliases-package: com.len.entity + mapper-locations: classpath*:mapper/*.xml + check-config-location: true + +mapper: + mappers: + - com.len.base.BaseMapper + not-empty: false + identity: MYSQL + + +# PageHelperConfig 可以替代此方案 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql +logging: + level: + com.len.mapper: debug +#security: +# basic: +# enabled: false + +filePath: G\os\file\ + +imagePath: G:\os\image\ \ No newline at end of file diff --git a/len-web/src/main/resources/application-prod.yml b/len-web/src/main/resources/application-prod.yml new file mode 100644 index 0000000..a6ce8ee --- /dev/null +++ b/len-web/src/main/resources/application-prod.yml @@ -0,0 +1,59 @@ +server: + port: 8088 +security: + basic: + enabled: false +spring: + datasource: + url: jdbc:mysql://localhost:3306/lenos?useUnicode=true&characterEncoding=UTF-8 + username: root + password: 123456 + # 使用druid数据源 + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + http: + encoding: + force: true + + +mybatis: + type-aliases-package: com.len.entity + mapper-locations: classpath*:mapper/*.xml + check-config-location: true + +mapper: + mappers: + - com.len.base.BaseMapper + not-empty: false + identity: MYSQL + + +# PageHelperConfig 可以替代此方案 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql +logging: + level: + com.len.mapper: debug +#security: +# basic: +# enabled: false + +filePath: G\os\file\ + +imagePath: G:\os\image\ \ No newline at end of file diff --git a/len-web/src/main/resources/application-test.yml b/len-web/src/main/resources/application-test.yml new file mode 100644 index 0000000..1c8ee39 --- /dev/null +++ b/len-web/src/main/resources/application-test.yml @@ -0,0 +1,59 @@ +server: + port: 8089 +security: + basic: + enabled: false +spring: + datasource: + url: jdbc:mysql://localhost:3306/lenos?useUnicode=true&characterEncoding=UTF-8 + username: root + password: 123456 + # 使用druid数据源 + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + http: + encoding: + force: true + + +mybatis: + type-aliases-package: com.len.entity + mapper-locations: classpath*:mapper/*.xml + check-config-location: true + +mapper: + mappers: + - com.len.base.BaseMapper + not-empty: false + identity: MYSQL + + +# PageHelperConfig 可以替代此方案 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql +logging: + level: + com.len.mapper: debug +#security: +# basic: +# enabled: false + +filePath: G\os\file\ + +imagePath: G:\os\image\ \ No newline at end of file diff --git a/len-web/src/main/resources/application.yml b/len-web/src/main/resources/application.yml index 96e0bdb..caf4dfc 100644 --- a/len-web/src/main/resources/application.yml +++ b/len-web/src/main/resources/application.yml @@ -1,59 +1,3 @@ -server: - port: 8081 -security: - basic: - enabled: false spring: - datasource: - url: jdbc:mysql://localhost:3306/lenos?useUnicode=true&characterEncoding=UTF-8 - username: root - password: 123456 - # 使用druid数据源 - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.jdbc.Driver - filters: stat - maxActive: 20 - initialSize: 1 - maxWait: 60000 - minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 - validationQuery: select 'x' - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - poolPreparedStatements: true - maxOpenPreparedStatements: 20 - http: - encoding: - force: true - - -mybatis: - type-aliases-package: com.len.entity - mapper-locations: classpath*:mapper/*.xml - check-config-location: true - -mapper: - mappers: - - com.len.base.BaseMapper - not-empty: false - identity: MYSQL - - -# PageHelperConfig 可以替代此方案 -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql -logging: - level: - com.len.mapper: debug -#security: -# basic: -# enabled: false - -filePath: G\os\file\ - -imagePath: G:\os\image\ \ No newline at end of file + profiles: + active: dev \ No newline at end of file