From db8ab7ffad04672d44a3fb2a97d4b75597a814b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 19 Aug 2026 15:18:44 +0800 Subject: [PATCH] =?UTF-8?q?chore(config):=20=E6=9B=B4=E6=96=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8C=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改 application.yml 中 server 端口和 redis 主机及密码配置 - 新增 application-yxw.yml 生产环境配置文件,包含数据源、日志、socketio 和阿里云 OSS 配置 - pom.xml 中项目 artifactId 和 name 修改为 yxw-api - 优化配置文件格式及注释,完善定时任务表达式配置 --- pom.xml | 4 +-- src/main/resources/application-yxw.yml | 50 ++++++++++++++++++++++++++ src/main/resources/application.yml | 6 ++-- 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/application-yxw.yml diff --git a/pom.xml b/pom.xml index 5ac4f27..b90c9d5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,10 +4,10 @@ 4.0.0 com.gxwebsoft - com-gxwebsoft-server + yxw-api 1.5.2 - com-gxwebsoft-api + yxw-api WebSoftApi project for Spring Boot diff --git a/src/main/resources/application-yxw.yml b/src/main/resources/application-yxw.yml new file mode 100644 index 0000000..ac75ed0 --- /dev/null +++ b/src/main/resources/application-yxw.yml @@ -0,0 +1,50 @@ +# 生产环境配置 + +# 数据源配置 +spring: + datasource: + url: jdbc:mysql://1Panel-mysql-XsWW:3306/yunxinwei?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + username: yunxinwei + password: T4xEYiwTdEmS2ZED + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + +# 日志配置 +logging: + file: + name: logs/websoft-api.log + level: + root: INFO + com.gxwebsoft: INFO + com.baomidou.mybatisplus: ERROR + com.alipay.api: INFO + logback: + rollingpolicy: + # file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd}.%i.log + max-history: 30 + +socketio: + host: 0.0.0.0 #IP地址 +# host: localhost + +# 框架配置 +config: + # 生产环境接口 + server-url: https://yxw-api.websoft.top/api + # server-url: https://127.0.0.1:9090/api + upload-path: /www/wwwroot/file.ws/ + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-yunxinwei + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-yunxinwei.oss-cn-shenzhen.aliyuncs.com + + +#定时表达式 +cron: + alert: 0 30 9 * * ? + profit: 0 0/2 * * * ? + timeoutOrder: 1 0 0 * * ? diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 58b91b3..a6100de 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ # 端口 server: - port: 9200 + port: 9300 # socketIo socketio: port: 9190 @@ -47,9 +47,9 @@ spring: max-request-size: 100MB redis: database: 7 - host: 1Panel-redis-CnJa + host: 1Panel-redis-GmNr port: 6379 - password: redis_xGXDip + password: redis_t74P8C # 邮件服务器配置 mail: