完成JC-ArtList与JC-Salon端侧清理和统一命名

This commit is contained in:
2026-08-25 16:21:05 +08:00
parent aa93695704
commit abce4a2787
1839 changed files with 653 additions and 50415 deletions
@@ -0,0 +1,163 @@
spring:
cloud:
gateway:
routes:
# 前台API路由
- id: product-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/product/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: product-like-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/product-like/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: shop-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/shop/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: user-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/user/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: comment-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/comment/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: balance-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/balance/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: tag-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/tag/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: file-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/file/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: permission-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/permission/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: coupon-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/coupon/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: cart-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/cart/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: order-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/order/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: wishlist-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/wishlist/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: nail-artist-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/nail-artist/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
- id: legal-agreement-route
uri: lb://jc-artlist-core
predicates:
- Path=/api/legal-agreement/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
# 后台管理API路由(/api/admin/** 格式)
- id: admin-api-route
order: -10
uri: lb://jc-artlist-core
predicates:
- Path=/api/admin/**
filters:
- RewritePath=/api/admin/(?<remaining>.*), /admin/${remaining}
# 后台管理API路由(/admin/api/** 格式)
- id: admin-route
order: -9
uri: lb://jc-artlist-core
predicates:
- Path=/admin/api/**
filters:
- RewritePath=/admin/api/(?<remaining>.*), /admin/${remaining}
- id: admin-auth-compat-route
order: -8
uri: lb://jc-artlist-core
predicates:
- Path=/admin/auth/**
# 前台API兜底路由,避免 Core 新增模块后 Gateway 未同步导致 404
- id: frontend-fallback-route
order: 100
uri: lb://jc-artlist-core
predicates:
- Path=/api/**
filters:
- RewritePath=/api/(?<remaining>.*), /${remaining}
fingertip-designer:
security:
jwt:
issuer: fingertip-designer
clock-skew-seconds: 30
gateway:
whitelist:
- /api/user/login
- /api/user/register
- /api/user/check/**
- /api/user/refresh-token
- /api/user/send-verification-code
- /api/user/phone-login
- /api/user/wechat-mini/**
- /api/user/reset-password-by-phone
- /api/nail-artist/profile/**
- /api/nail-artist/*/availability
- /api/nail-artist/*/reviews
- /api/shop/list
- /api/shop/list/simple
- /api/legal-agreement/current
- /api/legal-agreement/current/**
- /api/health/**
- /api/error
- /api/admin/auth/login
- /api/admin/auth/login-shops/**
- /api/admin/auth/refresh
- /api/admin/auth/register
- /admin/auth/login
- /admin/auth/login-shops/**
- /admin/auth/refresh
- /admin/api/auth/login
- /admin/api/auth/login-shops/**
- /admin/api/auth/refresh
slow-request:
enabled: true
threshold-ms: 300
log-response-header-request-id: true
@@ -0,0 +1,45 @@
spring:
application:
name: jc-artlist-gateway
cloud:
nacos:
discovery:
# Nacos 集群地址,默认指向开发环境,生产环境通过环境变量覆盖。
server-addr: ${NACOS_SERVER_ADDR:192.168.10.11:8848,192.168.10.12:8848,192.168.10.13:8848}
# Nacos 命名空间,默认指向开发环境
namespace: ${NACOS_NAMESPACE:jayucloud-artlist}
# 服务注册分组。
group: ${NACOS_GROUP:DEFAULT_GROUP}
# 注册到 Nacos 的服务名。
service: ${spring.application.name}
# Nacos 认证用户名。
username: ${NACOS_USERNAME}
# Nacos 认证密码。
password: ${NACOS_PASSWORD}
config:
# Nacos 配置中心地址,与服务发现使用同一组集群节点,默认指向开发环境。
server-addr: ${NACOS_SERVER_ADDR:192.168.10.11:8848,192.168.10.12:8848,192.168.10.13:8848}
# Nacos 配置中心命名空间,默认指向开发环境。
namespace: ${NACOS_NAMESPACE:jayucloud-artlist}
# 配置分组。
group: ${NACOS_GROUP:DEFAULT_GROUP}
# Gateway 服务独有配置文件。
name: gateway
# 所有 Nacos 配置均使用 YAML。
file-extension: yaml
# Nacos 认证用户名。
username: ${NACOS_USERNAME}
# Nacos 认证密码。
password: ${NACOS_PASSWORD}
# Core 与 Gateway 共享的公共配置文件。
shared-configs:
- data-id: infra.yaml
group: ${NACOS_GROUP:DEFAULT_GROUP}
refresh: true
- data-id: secret.yaml
group: ${NACOS_GROUP:DEFAULT_GROUP}
refresh: true
- data-id: logging.yaml
group: ${NACOS_GROUP:DEFAULT_GROUP}
refresh: true
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Properties>
<Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
<Property name="LOG_HOME">E:/code/xiaowang/JC-ArtList-Gateway/logs</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
</Console>
<RollingFile name="RollingFile" fileName="${LOG_HOME}/jc-artlist-gateway.log"
filePattern="${LOG_HOME}/jc-artlist-gateway-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="30">
<Delete basePath="${LOG_HOME}" maxDepth="1">
<IfFileName glob="jc-artlist-gateway-*.log.gz"/>
<IfLastModified age="30d"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
<RollingFile name="ErrorRollingFile" fileName="${LOG_HOME}/jc-artlist-gateway-error.log"
filePattern="${LOG_HOME}/jc-artlist-gateway-error-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}"/>
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="30">
<Delete basePath="${LOG_HOME}" maxDepth="1">
<IfFileName glob="jc-artlist-gateway-error-*.log.gz"/>
<IfLastModified age="30d"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
<RollingFile name="SlowRollingFile" fileName="${LOG_HOME}/jc-artlist-gateway-slow.log"
filePattern="${LOG_HOME}/jc-artlist-gateway-slow-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="30">
<Delete basePath="${LOG_HOME}" maxDepth="1">
<IfFileName glob="jc-artlist-gateway-slow-*.log.gz"/>
<IfLastModified age="30d"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="ErrorRollingFile"/>
</Root>
<Logger name="com.xiaowang.fingertipdesigner.gateway" level="INFO" additivity="false">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="ErrorRollingFile"/>
</Logger>
<Logger name="gateway-slow" level="WARN" additivity="false">
<AppenderRef ref="SlowRollingFile"/>
</Logger>
<Logger name="org.springframework" level="INFO"/>
<Logger name="com.alibaba.nacos" level="INFO"/>
</Loggers>
</Configuration>