From 60f777b400014679211fb3046e25e9dfca0f58ef Mon Sep 17 00:00:00 2001 From: duzhichao Date: Wed, 23 Jul 2025 18:36:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E8=B0=83=E6=95=B4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8F=8A=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E6=B3=A8=E9=87=8A=E6=95=8F=E6=84=9F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B9=B6=E4=BC=98=E5=8C=96Nacos=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 8 +- .../src/main/resources/bootstrap.yml | 10 +- .../main/resources/application-dev.properties | 212 +++++++++--------- .../resources/application-prod.properties | 188 ++++++++-------- .../src/main/resources/bootstrap.yml | 4 + 5 files changed, 213 insertions(+), 209 deletions(-) diff --git a/zlt-business/device-center/src/main/resources/bootstrap.yml b/zlt-business/device-center/src/main/resources/bootstrap.yml index 1a0e7044..3b3b43e4 100644 --- a/zlt-business/device-center/src/main/resources/bootstrap.yml +++ b/zlt-business/device-center/src/main/resources/bootstrap.yml @@ -4,10 +4,10 @@ server: spring: application: name: device-center - cloud: - nacos: - discovery: - ip: 119.45.169.13 +# cloud: +# nacos: +# discovery: +# ip: 119.45.169.13 # cloud: # nacos: # discovery: diff --git a/zlt-business/device-ops-center/src/main/resources/bootstrap.yml b/zlt-business/device-ops-center/src/main/resources/bootstrap.yml index 089b3db0..1f7e34f6 100644 --- a/zlt-business/device-ops-center/src/main/resources/bootstrap.yml +++ b/zlt-business/device-ops-center/src/main/resources/bootstrap.yml @@ -1,13 +1,13 @@ server: - port: 7002 + port: 7003 spring: application: name: device-ops-center - cloud: - nacos: - discovery: - ip: 119.45.169.13 +# cloud: +# nacos: +# discovery: +# ip: 119.45.169.13 # cloud: # nacos: # discovery: diff --git a/zlt-config/src/main/resources/application-dev.properties b/zlt-config/src/main/resources/application-dev.properties index da93d5b1..ae947995 100644 --- a/zlt-config/src/main/resources/application-dev.properties +++ b/zlt-config/src/main/resources/application-dev.properties @@ -1,107 +1,107 @@ -########################## 统一变量配置 ########################## -##### 数据库配置 -zlt.datasource.ip=127.0.0.1 -zlt.datasource.username=root -zlt.datasource.password=root -#zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 +########################### 统一变量配置 ########################## +###### 数据库配置 +#zlt.datasource.ip=127.0.0.1 #zlt.datasource.username=root -#zlt.datasource.password=ZXC_zxc!@#123+ - -##### redis配置 -spring.data.redis.host=192.168.2.20 -spring.data.redis.port=6379 -spring.data.redis.password=ikingtec123456 -spring.data.redis.database=8 -spring.data.redis.timeout=5000 - -##### elasticsearch配置 -zlt.elasticsearch.uris=192.168.28.130:9200 -zlt.elasticsearch.username=elastic -zlt.elasticsearch.password=qEnNfKNujqNrOPD9q5kb - -##### sentinel配置 -zlt.sentinel.dashboard=192.168.28.130:6999 - -##### fastDFS配置 -zlt.fdfs.web-url=192.168.28.130 -zlt.fdfs.trackerList=${zlt.fdfs.web-url}:22122 - -##### s3配置 -zlt.s3.access-key=Hq78CaYg2BI6ZfxCRMKI -zlt.s3.accessKeySecret=DJCt5q9K7GQ2zcBEfr3twb1vQ6BgUW1LKFlI5NSw -zlt.s3.endpoint=http://220.205.16.27:9000 -zlt.s3.bucketName=gofly-test -zlt.s3.region=us-east-1 - -zlt.oss.secretId=LTAI5tSNV1RvexXpMMCZhxSe -zlt.oss.secretKey=XocJRWU8emwjjvYLTrc04l91VZMkQK -zlt.oss.endpoint=https://oss-cn-beijing.aliyuncs.com -zlt.oss.bucketName=goflyapp - -#### cos配置 -zlt.cos.secretId=AKIDkMn6B3h7KJ5dIkyzpRr7C6mFUqFWbu1u -zlt.cos.secretKey=jDThssfEZieS4S8bqsgIiAUdbXVVYgdQ -zlt.cos.endpoint=gofly-1333114031.cos.ap-nanjing.myqcloud.com -zlt.cos.bucketName=gofly-1333114031 -zlt.cos.region=ap-nanjing - -# 数据迁移配置 -zlt.storage.hot-data-days=30 -zlt.storage.enable-time-window=false -zlt.migration.enable-verification: true - - -##### 日志链路追踪 -zlt.trace.enable=true - -##### 负载均衡隔离(version隔离,只适用于开发环境) -zlt.ribbon.isolation.enabled=false - -##### mybatis-plus打印完整sql(只适用于开发环境) -mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl - -# 开启版本路由 -#zlt.loadbalance.isolation.enabled=true - -zlt.security.tencent.appId=wx0c3cc6f1d297644d -zlt.security.tencent.appSecret=9d344e6c86b42105b6e4a018f242e233 -zlt.security.tencent.token=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pT -zlt.security.tencent.encodingAESKey=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pTZiyHTxCiQxh -zlt.security.tencent.templateId=YOUR_TEMPLATE_ID -zlt.security.tencent.jscode2sessionUrl=https://api.weixin.qq.com/sns/jscode2session -zlt.security.tencent.accessTokenUrl=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${zlt.security.tencent.appId}&secret=${zlt.security.tencent.appSecret} -zlt.security.tencent.getwxacodeUrl=https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token= -zlt.security.tencent.pagePath=/pages/link/link?uuid= - - -# 微信支付商户号 -zlt.wxpay.merchantId=1703796518 -# 商户证书序列号 -zlt.wxpay.merchantSerialNumber=11F4AC03C50EB582D3EDE082591D1F9A65388D51 -# 微信支付申请的应用ID -zlt.wxpay.appId=wx30a3c8de94a85584 -# 微信支付异步通知地址(需外网可访问且与微信支付平台配置一致) -zlt.wxpay.notifyUrl=https://img.goflytec.com/api-order/wechat/pay/notify -# 微信退款异步通知地址(需外网可访问且与微信支付平台配置一致) -zlt.wxrefund.notifyUrl= https://img.goflytec.com/api-order/wechat/refund/notify -# 商户API私钥路径 -zlt.wxpay.privateKeyPath=D:\\wx\\WXCertUtil\\cert\\1703796518_20250114_cert\\apiclient_key.pem -# 商户APIV3密钥 -zlt.wxpay.apiV3Key=aIt5Vw3cYXSCSd4L5h14kIyDsoXBow7r - - -zlt.tenant.id: webApp - -# 选择服务商:TENCENT 或 ALIYUN -sms.provider=ALIYUN - -# 腾讯云短信配置 -sms.tencent.appId=1400xxxxxxx # 短信应用ID -sms.tencent.secretId=AKIDxxxxxxx # 控制台API密钥 -sms.tencent.secretKey=xxxxxxxxxxxx # 控制台API密钥 -sms.tencent.signName=xxx - -# 阿里云短信配置 -sms.aliyun.accessKeyId=xxx -sms.aliyun.accessKeySecret=xxx -sms.aliyun.signName=xxx +#zlt.datasource.password=root +##zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 +##zlt.datasource.username=root +##zlt.datasource.password=ZXC_zxc!@#123+ +# +###### redis配置 +#spring.data.redis.host=192.168.2.20 +#spring.data.redis.port=6379 +#spring.data.redis.password=ikingtec123456 +#spring.data.redis.database=8 +#spring.data.redis.timeout=5000 +# +###### elasticsearch配置 +#zlt.elasticsearch.uris=192.168.28.130:9200 +#zlt.elasticsearch.username=elastic +#zlt.elasticsearch.password=qEnNfKNujqNrOPD9q5kb +# +###### sentinel配置 +#zlt.sentinel.dashboard=192.168.28.130:6999 +# +###### fastDFS配置 +#zlt.fdfs.web-url=192.168.28.130 +#zlt.fdfs.trackerList=${zlt.fdfs.web-url}:22122 +# +###### s3配置 +#zlt.s3.access-key=Hq78CaYg2BI6ZfxCRMKI +#zlt.s3.accessKeySecret=DJCt5q9K7GQ2zcBEfr3twb1vQ6BgUW1LKFlI5NSw +#zlt.s3.endpoint=http://220.205.16.27:9000 +#zlt.s3.bucketName=gofly-test +#zlt.s3.region=us-east-1 +# +#zlt.oss.secretId=LTAI5tSNV1RvexXpMMCZhxSe +#zlt.oss.secretKey=XocJRWU8emwjjvYLTrc04l91VZMkQK +#zlt.oss.endpoint=https://oss-cn-beijing.aliyuncs.com +#zlt.oss.bucketName=goflyapp +# +##### cos配置 +#zlt.cos.secretId=AKIDkMn6B3h7KJ5dIkyzpRr7C6mFUqFWbu1u +#zlt.cos.secretKey=jDThssfEZieS4S8bqsgIiAUdbXVVYgdQ +#zlt.cos.endpoint=gofly-1333114031.cos.ap-nanjing.myqcloud.com +#zlt.cos.bucketName=gofly-1333114031 +#zlt.cos.region=ap-nanjing +# +## 数据迁移配置 +#zlt.storage.hot-data-days=30 +#zlt.storage.enable-time-window=false +#zlt.migration.enable-verification: true +# +# +###### 日志链路追踪 +#zlt.trace.enable=true +# +###### 负载均衡隔离(version隔离,只适用于开发环境) +#zlt.ribbon.isolation.enabled=false +# +###### mybatis-plus打印完整sql(只适用于开发环境) +#mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl +# +## 开启版本路由 +##zlt.loadbalance.isolation.enabled=true +# +#zlt.security.tencent.appId=wx0c3cc6f1d297644d +#zlt.security.tencent.appSecret=9d344e6c86b42105b6e4a018f242e233 +#zlt.security.tencent.token=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pT +#zlt.security.tencent.encodingAESKey=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pTZiyHTxCiQxh +#zlt.security.tencent.templateId=YOUR_TEMPLATE_ID +#zlt.security.tencent.jscode2sessionUrl=https://api.weixin.qq.com/sns/jscode2session +#zlt.security.tencent.accessTokenUrl=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${zlt.security.tencent.appId}&secret=${zlt.security.tencent.appSecret} +#zlt.security.tencent.getwxacodeUrl=https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token= +#zlt.security.tencent.pagePath=/pages/link/link?uuid= +# +# +## 微信支付商户号 +#zlt.wxpay.merchantId=1703796518 +## 商户证书序列号 +#zlt.wxpay.merchantSerialNumber=11F4AC03C50EB582D3EDE082591D1F9A65388D51 +## 微信支付申请的应用ID +#zlt.wxpay.appId=wx30a3c8de94a85584 +## 微信支付异步通知地址(需外网可访问且与微信支付平台配置一致) +#zlt.wxpay.notifyUrl=https://img.goflytec.com/api-order/wechat/pay/notify +## 微信退款异步通知地址(需外网可访问且与微信支付平台配置一致) +#zlt.wxrefund.notifyUrl= https://img.goflytec.com/api-order/wechat/refund/notify +## 商户API私钥路径 +#zlt.wxpay.privateKeyPath=D:\\wx\\WXCertUtil\\cert\\1703796518_20250114_cert\\apiclient_key.pem +## 商户APIV3密钥 +#zlt.wxpay.apiV3Key=aIt5Vw3cYXSCSd4L5h14kIyDsoXBow7r +# +# +#zlt.tenant.id: webApp +# +## 选择服务商:TENCENT 或 ALIYUN +#sms.provider=ALIYUN +# +## 腾讯云短信配置 +#sms.tencent.appId=1400xxxxxxx # 短信应用ID +#sms.tencent.secretId=AKIDxxxxxxx # 控制台API密钥 +#sms.tencent.secretKey=xxxxxxxxxxxx # 控制台API密钥 +#sms.tencent.signName=xxx +# +## 阿里云短信配置 +#sms.aliyun.accessKeyId=xxx +#sms.aliyun.accessKeySecret=xxx +#sms.aliyun.signName=xxx diff --git a/zlt-config/src/main/resources/application-prod.properties b/zlt-config/src/main/resources/application-prod.properties index 8c1a9690..660ec7ce 100644 --- a/zlt-config/src/main/resources/application-prod.properties +++ b/zlt-config/src/main/resources/application-prod.properties @@ -1,94 +1,94 @@ -########################## 统一变量配置 ########################## -##### 数据库配置 -zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 -zlt.datasource.username=root -zlt.datasource.password=ZXC_zxc!@#123+ - -##### redis配置 -spring.data.redis.host=81.70.164.178 -#spring.data.redis.host=127.0.0.1 -spring.data.redis.port=6379 -spring.data.redis.password=mvaiopdle7IwdQrinzTQ -spring.data.redis.database=0 -spring.data.redis.timeout=5000 - - -##### elasticsearch配置 -zlt.elasticsearch.uris=119.45.169.13:9200 -zlt.elasticsearch.username=elastic -zlt.elasticsearch.password=iot123456@ - -##### sentinel配置 -zlt.sentinel.dashboard=192.168.28.130:6999 - -##### fastDFS配置 -zlt.fdfs.web-url=192.168.28.130 -zlt.fdfs.trackerList=${zlt.fdfs.web-url}:22122 - -##### s3配置 -zlt.s3.access-key=33RdDbIlEFK0z9IJHSqx -zlt.s3.accessKeySecret=mmfSh4gjJm8dck0KaG6fKItpIM3tenWVHS4Ygjlm -zlt.s3.endpoint=http://81.70.164.178:9000 -zlt.s3.bucketName=gofly - -zlt.oss.secretId=LTAI5tSNV1RvexXpMMCZhxSe -zlt.oss.secretKey=XocJRWU8emwjjvYLTrc04l91VZMkQK -zlt.oss.endpoint=https://oss-cn-beijing.aliyuncs.com -zlt.oss.bucketName=goflyapp - -#### cos配置 -zlt.cos.secretId=AKIDkMn6B3h7KJ5dIkyzpRr7C6mFUqFWbu1u -zlt.cos.secretKey=jDThssfEZieS4S8bqsgIiAUdbXVVYgdQ -zlt.cos.endpoint=gofly-1333114031.cos.ap-nanjing.myqcloud.com -zlt.cos.bucketName=gofly-1333114031 -zlt.cos.region=ap-nanjing - -# 数据迁移配置 -zlt.storage.hot-data-days=30 -zlt.storage.enable-time-window=false -zlt.migration.enable-verification: true - -##### 日志链路追踪 -zlt.trace.enable=true - -zlt.security.tencent.appId=wx30a3c8de94a85584 -zlt.security.tencent.appSecret=e64d6e3dcfe88d0daee50e77f5a2ee69 -zlt.security.tencent.token=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pT -zlt.security.tencent.encodingAESKey=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pTZiyHTxCiQxh -zlt.security.tencent.templateId=YOUR_TEMPLATE_ID -zlt.security.tencent.jscode2sessionUrl=https://api.weixin.qq.com/sns/jscode2session -zlt.security.tencent.accessTokenUrl=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${zlt.security.tencent.appId}&secret=${zlt.security.tencent.appSecret} -zlt.security.tencent.getwxacodeUrl=https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token= -zlt.security.tencent.pagePath=/pages/link/link?uuid= - -# 微信支付商户号 -zlt.wxpay.merchantId=1703796518 -# 商户证书序列号 -zlt.wxpay.merchantSerialNumber=11F4AC03C50EB582D3EDE082591D1F9A65388D51 -# 61CBFF26EC90204F8F308B6D318E90F14DF233FC -# 微信支付申请的应用ID -zlt.wxpay.appId=wx30a3c8de94a85584 -# 微信支付异步通知地址(需外网可访问且与微信支付平台配置一致) -zlt.wxpay.notifyUrl=https://img.goflytec.com/api-order/wechat/pay/notify -# 微信退款异步通知地址(需外网可访问且与微信支付平台配置一致) -zlt.wxrefund.notifyUrl= https://img.goflytec.com/api-order/wechat/refund/notify -# 商户API私钥路径 -zlt.wxpay.privateKeyPath=/data/zlt/cert/apiclient_key.pem -# 商户APIV3密钥 -zlt.wxpay.apiV3Key=aIt5Vw3cYXSCSd4L5h14kIyDsoXBow7r - -zlt.tenant.id: webApp - -# 选择服务商:TENCENT 或 ALIYUN -sms.provider=ALIYUN - -# 腾讯云短信配置 -sms.tencent.appId=1400xxxxxxx # 短信应用ID -sms.tencent.secretId=AKIDxxxxxxx # 控制台API密钥 -sms.tencent.secretKey=xxxxxxxxxxxx # 控制台API密钥 -sms.tencent.signName=xxx - -# 阿里云短信配置 -sms.aliyun.accessKeyId=xxx -sms.aliyun.accessKeySecret=xxx -sms.aliyun.signName=xxx +########################### 统一变量配置 ########################## +###### 数据库配置 +#zlt.datasource.ip=sh-cdb-i6yxaaec.sql.tencentcdb.com:58797 +#zlt.datasource.username=root +#zlt.datasource.password=ZXC_zxc!@#123+ +# +###### redis配置 +#spring.data.redis.host=81.70.164.178 +##spring.data.redis.host=127.0.0.1 +#spring.data.redis.port=6379 +#spring.data.redis.password=mvaiopdle7IwdQrinzTQ +#spring.data.redis.database=0 +#spring.data.redis.timeout=5000 +# +# +###### elasticsearch配置 +#zlt.elasticsearch.uris=119.45.169.13:9200 +#zlt.elasticsearch.username=elastic +#zlt.elasticsearch.password=iot123456@ +# +###### sentinel配置 +#zlt.sentinel.dashboard=192.168.28.130:6999 +# +###### fastDFS配置 +#zlt.fdfs.web-url=192.168.28.130 +#zlt.fdfs.trackerList=${zlt.fdfs.web-url}:22122 +# +###### s3配置 +#zlt.s3.access-key=33RdDbIlEFK0z9IJHSqx +#zlt.s3.accessKeySecret=mmfSh4gjJm8dck0KaG6fKItpIM3tenWVHS4Ygjlm +#zlt.s3.endpoint=http://81.70.164.178:9000 +#zlt.s3.bucketName=gofly +# +#zlt.oss.secretId=LTAI5tSNV1RvexXpMMCZhxSe +#zlt.oss.secretKey=XocJRWU8emwjjvYLTrc04l91VZMkQK +#zlt.oss.endpoint=https://oss-cn-beijing.aliyuncs.com +#zlt.oss.bucketName=goflyapp +# +##### cos配置 +#zlt.cos.secretId=AKIDkMn6B3h7KJ5dIkyzpRr7C6mFUqFWbu1u +#zlt.cos.secretKey=jDThssfEZieS4S8bqsgIiAUdbXVVYgdQ +#zlt.cos.endpoint=gofly-1333114031.cos.ap-nanjing.myqcloud.com +#zlt.cos.bucketName=gofly-1333114031 +#zlt.cos.region=ap-nanjing +# +## 数据迁移配置 +#zlt.storage.hot-data-days=30 +#zlt.storage.enable-time-window=false +#zlt.migration.enable-verification: true +# +###### 日志链路追踪 +#zlt.trace.enable=true +# +#zlt.security.tencent.appId=wx30a3c8de94a85584 +#zlt.security.tencent.appSecret=e64d6e3dcfe88d0daee50e77f5a2ee69 +#zlt.security.tencent.token=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pT +#zlt.security.tencent.encodingAESKey=YPbzETU8oe3XguGgwtA4g1DqlFKvw7pTZiyHTxCiQxh +#zlt.security.tencent.templateId=YOUR_TEMPLATE_ID +#zlt.security.tencent.jscode2sessionUrl=https://api.weixin.qq.com/sns/jscode2session +#zlt.security.tencent.accessTokenUrl=https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${zlt.security.tencent.appId}&secret=${zlt.security.tencent.appSecret} +#zlt.security.tencent.getwxacodeUrl=https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token= +#zlt.security.tencent.pagePath=/pages/link/link?uuid= +# +## 微信支付商户号 +#zlt.wxpay.merchantId=1703796518 +## 商户证书序列号 +#zlt.wxpay.merchantSerialNumber=11F4AC03C50EB582D3EDE082591D1F9A65388D51 +## 61CBFF26EC90204F8F308B6D318E90F14DF233FC +## 微信支付申请的应用ID +#zlt.wxpay.appId=wx30a3c8de94a85584 +## 微信支付异步通知地址(需外网可访问且与微信支付平台配置一致) +#zlt.wxpay.notifyUrl=https://img.goflytec.com/api-order/wechat/pay/notify +## 微信退款异步通知地址(需外网可访问且与微信支付平台配置一致) +#zlt.wxrefund.notifyUrl= https://img.goflytec.com/api-order/wechat/refund/notify +## 商户API私钥路径 +#zlt.wxpay.privateKeyPath=/data/zlt/cert/apiclient_key.pem +## 商户APIV3密钥 +#zlt.wxpay.apiV3Key=aIt5Vw3cYXSCSd4L5h14kIyDsoXBow7r +# +#zlt.tenant.id: webApp +# +## 选择服务商:TENCENT 或 ALIYUN +#sms.provider=ALIYUN +# +## 腾讯云短信配置 +#sms.tencent.appId=1400xxxxxxx # 短信应用ID +#sms.tencent.secretId=AKIDxxxxxxx # 控制台API密钥 +#sms.tencent.secretKey=xxxxxxxxxxxx # 控制台API密钥 +#sms.tencent.signName=xxx +# +## 阿里云短信配置 +#sms.aliyun.accessKeyId=xxx +#sms.aliyun.accessKeySecret=xxx +#sms.aliyun.signName=xxx diff --git a/zlt-gateway/sc-gateway/src/main/resources/bootstrap.yml b/zlt-gateway/sc-gateway/src/main/resources/bootstrap.yml index 02691bb3..a72298b7 100644 --- a/zlt-gateway/sc-gateway/src/main/resources/bootstrap.yml +++ b/zlt-gateway/sc-gateway/src/main/resources/bootstrap.yml @@ -4,5 +4,9 @@ server: spring: application: name: sc-gateway + cloud: + nacos: + config: + group: DEFAULT_GROUP main: web-application-type: reactive \ No newline at end of file