修复openapi、file模块docker部署失败的问题

This commit is contained in:
2026-08-07 13:35:21 +08:00
parent ed0e61563c
commit 21b2884bad
3 changed files with 5 additions and 91 deletions

View File

@@ -1,50 +1,2 @@
server:
port: 8107
spring:
application:
name: blade-file
cloud:
nacos:
discovery:
namespace: ${spring.profiles.active}
config:
file-extension: yaml
namespace: ${spring.profiles.active}
shared-configs:
- data-id: blade.yaml
refresh: true
- data-id: blade-${spring.profiles.active}.yaml
refresh: true
#spring:
# application:
# name: blade-file
# cloud:
# nacos:
# discovery:
# namespace: ${spring.profiles.active}
# # 不注册到nacos
# #registerEnabled: false
# config:
# # 文件后缀名
# file-extension: yaml
# namespace: ${spring.profiles.active}
# shared-configs:
# - data-id: blade.yaml
# refresh: true
# - data-id: blade-${spring.profiles.active}.yaml
# refresh: true
# - data-id: third-party-api.yaml
# refresh: true
# sentinel:
# datasource:
# flow:
# nacos:
# serverAddr: ${spring.cloud.nacos.server-addr}
# username: ${spring.cloud.nacos.username}
# password: ${spring.cloud.nacos.password}
# dataId: sentinel-${spring.application.name}.json
# groupId: DEFAULT_GROUP
# namespace: ${spring.profiles.active}
# ruleType: flow

View File

@@ -1,43 +1,2 @@
server:
port: 8108
spring:
application:
name: blade-openapi
cloud:
nacos:
discovery:
namespace: ${spring.profiles.active}
config:
file-extension: yaml
namespace: ${spring.profiles.active}
shared-configs:
- data-id: blade.yaml
refresh: true
- data-id: blade-${spring.profiles.active}.yaml
refresh: true
#spring:
# application:
# name: blade-openapi
# cloud:
# nacos:
# discovery:
# namespace: ${spring.profiles.active}
# # 不注册到nacos
# #registerEnabled: false
# config:
# # 文件后缀名
# file-extension: yaml
# namespace: ${spring.profiles.active}
# shared-configs:
# - data-id: blade.yaml
# refresh: true
# - data-id: blade-${spring.profiles.active}.yaml
# refresh: true
# - data-id: third-party-api.yaml
# refresh: true
# extension-configs:
# - data-id: ${spring.application.name}-dynamictp.yaml
# group: DEFAULT_GROUP
# refresh: true # 必须配置,负责自动刷新不生效

View File

@@ -67,7 +67,7 @@ public class CommonAddressServiceImpl extends BaseServiceImpl<CommonAddressMappe
private static final int REGION_CODE_MAX_LENGTH = 32;
private static final int REGION_MAX_LENGTH = 100;
private static final int CONTACT_MAX_LENGTH = 50;
private static final int PHONE_MAX_LENGTH = 30;
private static final int PHONE_MAX_LENGTH = 20;
private static final int REMARK_MAX_LENGTH = 200;
private static final BigDecimal MIN_LONGITUDE = new BigDecimal("-180");
private static final BigDecimal MAX_LONGITUDE = new BigDecimal("180");
@@ -271,7 +271,10 @@ public class CommonAddressServiceImpl extends BaseServiceImpl<CommonAddressMappe
validateLength(address.getRegionCode(), REGION_CODE_MAX_LENGTH, "行政区划编码不能超过32字");
validateLength(address.getRegionName(), REGION_MAX_LENGTH, "行政区划不能超过100字");
validateLength(address.getContactName(), CONTACT_MAX_LENGTH, "联系人不能超过50字");
validateLength(address.getContactPhone(), PHONE_MAX_LENGTH, "联系方式不能超过30字");
validateLength(address.getContactPhone(), PHONE_MAX_LENGTH, "联系方式不能超过20字");
if (Func.isNotEmpty(address.getContactPhone()) && !address.getContactPhone().matches("^\\d+$")) {
throw new ServiceException("联系方式只能输入数字");
}
validateLength(address.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
validateRange(address.getLongitude(), MIN_LONGITUDE, MAX_LONGITUDE, "经度范围为 -180 到 180");
validateRange(address.getLatitude(), MIN_LATITUDE, MAX_LATITUDE, "纬度范围为 -90 到 90");