From 103ece18f6e15616f1f774936c2d9eaf359b5eee Mon Sep 17 00:00:00 2001 From: wulin Date: Sat, 22 Mar 2025 20:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BA=BF=E4=B8=8A=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap-online.yml | 74 ++++++++++++++++ .../src/main/resources/log/logback-online.xml | 84 +++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 api-web/api-interface/src/main/resources/bootstrap-online.yml create mode 100644 api-web/api-interface/src/main/resources/log/logback-online.xml diff --git a/api-web/api-interface/src/main/resources/bootstrap-online.yml b/api-web/api-interface/src/main/resources/bootstrap-online.yml new file mode 100644 index 0000000..6d42ef4 --- /dev/null +++ b/api-web/api-interface/src/main/resources/bootstrap-online.yml @@ -0,0 +1,74 @@ +spring: + clound: + nacos: + discovery: + # 服务注册地址 + server-addr: 172.16.5.230:8848 + namespace: ${spring.profiles.active} + config: + # 配置中心地址 + server-addr: 172.16.5.230:8848 + namespace: ${spring.profiles.active} + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application.${spring.cloud.nacos.config.file-extension} + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + druid: + url: jdbc:mysql://172.16.5.230:3306/heyu_api?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: heyu_api + password: 'Ro_d39PlM^#8^f!2' + initial-size: 10 + max-active: 10 + min-idle: 5 + max-wait: 60000 + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 20 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + #Oracle需要打开注释 + validation-query: SELECT 1 + test-while-idle: true + test-on-borrow: false + test-on-return: false + filter: + stat: + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: false + wall: + config: + multi-statement-allow: true + + redis: + password: A_kMn84#@^_Lmc + port: 6379 + host: 172.16.5.230 + timeout: 5000 + rabbitmq: + host: 172.16.5.230 + port: 32407 + username: admin + password: Ij_klfJ^$^_3IBs + listener: + simple: + # 设置手动ack回复 + acknowledge-mode: manual + retry: + # 开启重试机制 + enabled: true + # 重试次数 + max-attempts: 3 + # 重试最大间隔时间 + max-interval: 100000 + # 重试初始间隔时间 + initial-interval: 100 + # 间隔时间因子 + multiplier: 20 + #设置消息发送回调 + publisher-returns: true + publisher-confirm-type: simple + virtual-host: /heyu \ No newline at end of file diff --git a/api-web/api-interface/src/main/resources/log/logback-online.xml b/api-web/api-interface/src/main/resources/log/logback-online.xml new file mode 100644 index 0000000..7fa04b8 --- /dev/null +++ b/api-web/api-interface/src/main/resources/log/logback-online.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + ${LOG_PATTERN} + UTF-8 + + + + + + ${LOG_HOME}/warn.log + + ${LOG_HOME}/logs/warn.%d{yyyy-MM-dd}.%i.log + 1024MB + > + + + + + ${LOG_PATTERN} + UTF-8 + + + WARN + + + + + + ${LOG_HOME}/error.log + + ${LOG_HOME}/logs/error.%d{yyyy-MM-dd }.%i.log + + 1024MB + + + + ${LOG_PATTERN} + UTF-8 + + + ERROR + + + + + ${LOG_HOME}/all.log + + ${LOG_HOME}/logs/all.%d{yyyy-MM-dd}.%i.log + + 1024MB + + + + ${LOG_PATTERN} + UTF-8 + + + INFO + + + + + + + + + + + + +