From 3deb8c213b6364d4f6d3cb54e3910c4f3bc60d07 Mon Sep 17 00:00:00 2001 From: wangjingsheng Date: Thu, 24 Mar 2022 10:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=81=E5=A4=8F=E7=BB=9F=E4=B8=80=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F=E5=90=AF=E5=8A=A8?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 30 +++++++++++ src/main/resources/application-local.yml | 18 +++++++ src/main/resources/application-prod.yml | 18 +++++++ src/main/resources/application.yml | 49 +++++++++++++++++ src/main/resources/logback.xml | 68 ++++++++++++++++++++++++ 5 files changed, 183 insertions(+) create mode 100644 src/main/resources/application-dev.yml create mode 100644 src/main/resources/application-local.yml create mode 100644 src/main/resources/application-prod.yml create mode 100644 src/main/resources/application.yml create mode 100644 src/main/resources/logback.xml diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..cdae14d --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,30 @@ +spring: + datasource: + driver-class-name: org.postgresql.Driver + username: postgres + password: postgresql + type: com.zaxxer.hikari.HikariDataSource + jdbc-url: jdbc:postgresql://cloud.wodcloud.com:33070/apaas4?stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true +# jdbc-url: jdbc:postgresql://localhost:5432/postgres?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true + + + redis: + host: 117.187.130.178 + port: 33077 + database: 0 + timeout: 3 + password: + pool: + minIdle: 1 + maxIdle: 10 + maxWait: 3 + maxActive: 8 + +knife4j: + enable: true + +#beagle: +# jwt: +# secret-key: ac2ceb11e6be4d9ea0a71c9b270c1cb8 +# token-prefix: Bearer +# expire-time: 18000 \ No newline at end of file diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml new file mode 100644 index 0000000..0f73a77 --- /dev/null +++ b/src/main/resources/application-local.yml @@ -0,0 +1,18 @@ +spring: + datasource: + driver-class-name: org.postgresql.Driver + username: postgres + password: 1234 + type: com.zaxxer.hikari.HikariDataSource +# jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true +# jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true + url: jdbc:postgresql://localhost:5432/postgres?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true + +knife4j: + enable: true + +#beagle: +# jwt: +# secret-key: ac2ceb11e6be4d9ea0a71c9b270c1cb8 +# token-prefix: Bearer +# expire-time: 18000 \ No newline at end of file diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..87a111b --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,18 @@ +spring: + datasource: + driver-class-name: org.postgresql.Driver + username: ocp_user + password: spaceIN511 + type: com.zaxxer.hikari.HikariDataSource + url: jdbc:postgresql://172.37.41.175:5432/pms3?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true + +knife4j: + enable: true + +#beagle: +# jwt: +# secret-key: ac2ceb11e6be4d9ea0a71c9b270c1cb8 +# token-prefix: Bearer +# expire-time: 18000 + + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..9a47390 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,49 @@ +server: + port: 8020 +# servlet: +# context-path: ${context-path:/pms-ocp} + +spring: + application: + name: dashboard + profiles: + active: ${profiles-active:local} + +knife4j: + enable: true + +mybatis-plus: + global-config: + #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断" + field-strategy: 0 + mapper-locations: classpath:/mapper/*.xml + configuration: + log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + # 是否开启自动驼峰命名规则 + map-underscore-to-camel-case: true + + #指定自定义 Handler 所在的包位置 + type-handlers-package: com.pms.ocp.common.handler + + +logging: + level: + com.pms.ocp.mapper: debug + org.springframework: warn + +#system: +# company_name: ${company_name:国网山东电力} +# company_code: ${company_code:074001001} + +#beagle: +# jwt: +# secret-key: memDataSource +# token-prefix: Bearer +# app-id: 8a10843a6a535e33016b873f96b7002f +# expire-time: 18000 + +# Swagger配置 +swagger: + # 是否开启swagger + enabled: true \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..164fc25 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,68 @@ + + + + + + + + + + ${PATTERN_FORMAT} + + + + + ${LOG_PATH}/interface_log_%d{yyyyMMdd}.log + ${MAX_HISTORY} + + + ${PATTERN_FORMAT} + + + ${MAX_FILE_SIZE} + + + + + ${LOG_PATH}/error_log_%d{yyyyMMdd}.log + ${MAX_HISTORY} + + + ${PATTERN_FORMAT} + + + ${MAX_FILE_SIZE} + + + + + ${LOG_PATH}/service_log_%d{yyyyMMdd}.log + ${MAX_HISTORY} + + + ${PATTERN_FORMAT} + + + ${MAX_FILE_SIZE} + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- 2.26.0