From 1d98f6eac344192e17c3fa1942294a47262a1ca7 Mon Sep 17 00:00:00 2001 From: gxwebsoft <170083662@qq.com> Date: Mon, 24 Nov 2025 11:56:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(config):=20=E6=B7=BB=E5=8A=A0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增数据源配置,包括MySQL连接信息和Druid连接池 - 配置Redis数据库连接参数 - 设置日志文件名和日志级别 - 配置SocketIO服务监听地址 - 启用Knife4j增强功能并关闭生产环境屏蔽 - 配置框架服务器URL和文件上传路径 - 添加阿里云OSS存储配置信息 - 设置生产环境证书加载模式和根路径 --- src/main/resources/application-hjm.yml | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/main/resources/application-hjm.yml diff --git a/src/main/resources/application-hjm.yml b/src/main/resources/application-hjm.yml new file mode 100644 index 0000000..f472de7 --- /dev/null +++ b/src/main/resources/application-hjm.yml @@ -0,0 +1,53 @@ +# 生产环境配置 + +# 数据源配置 +spring: + datasource: + url: jdbc:mysql://1Panel-mysql-Bqdt:3306/gxwebsoft_core?useSSL=false&serverTimezone=UTC + username: gxwebsoft_core + password: jdj7HYEdYHnYEFBy + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + redis: + database: 0 + host: 1Panel-redis-Q1LE + port: 6379 + password: redis_WSDb88 + +# 日志配置 +logging: + file: + name: websoft-core.log + level: + root: WARN + com.gxwebsoft: ERROR + com.baomidou.mybatisplus: ERROR + +socketio: + host: 0.0.0.0 #IP地址 + +knife4j: + # 开启knife4j增强 + enable: true + # 开启生产环境屏蔽,一定要先开启knife4j增强才会生效 + production: false + +# 框架配置 +config: + # 生产环境接口 + server-url: https://server.gxwebsoft.com/api + upload-path: /www/wwwroot/file.ws + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-gxwebsoft + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com + +# 生产环境证书配置 +certificate: + # 生产环境使用挂载卷模式 + load-mode: VOLUME + cert-root-path: /app/certs From 7081eec0b9c4030a039a2e990cdb9d290863756d Mon Sep 17 00:00:00 2001 From: gxwebsoft <170083662@qq.com> Date: Fri, 12 Dec 2025 12:45:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(config):=20=E6=9B=B4=E6=96=B0=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=8E=AF=E5=A2=83=E6=95=B0=E6=8D=AE=E5=BA=93=E5=92=8C?= =?UTF-8?q?Redis=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将数据库连接地址从 8.134.169.209 更新为 47.119.165.234 - 将 Redis 主机地址从 8.134.169.209 更新为 47.119.165.234 - 修改 UserMapper 查询条件,使用 is_default 替代 template_id 进行过滤 --- .../com/gxwebsoft/common/system/mapper/xml/UserMapper.xml | 2 +- src/main/resources/application-dev.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml index 15e101c..00aad89 100644 --- a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml @@ -315,7 +315,7 @@ FROM sys_user a AND a.phone = #{param.phone} - AND a.template_id = #{param.templateId} + AND a.is_default = 1 AND a.is_admin = 1 AND a.deleted = 0 LIMIT 1 diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index c5f4c55..bb600fe 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -5,14 +5,14 @@ spring: main: allow-circular-references: true datasource: - url: jdbc:mysql://8.134.169.209:13306/gxwebsoft_core?useSSL=false&serverTimezone=UTC + url: jdbc:mysql://47.119.165.234:13308/gxwebsoft_core?useSSL=false&serverTimezone=UTC username: gxwebsoft_core password: jdj7HYEdYHnYEFBy driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource redis: database: 0 - host: 8.134.169.209 + host: 47.119.165.234 port: 16379 password: redis_WSDb88