From 8506424c26e5e757e29c256bb26754381257957e Mon Sep 17 00:00:00 2001 From: pigeon Date: Fri, 5 Jun 2026 08:30:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E6=B7=BB=E5=8A=A0=20rui-servic?= =?UTF-8?q?e-starter=20Nacos=20=E9=85=8D=E7=BD=AE=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 rui-service-starter.yaml Nacos 配置模板 - 添加 modules 可用模块列表配置(供租户管理使用) 对应工单 #1 --- .../config-templates/application-template.yml | 17 ------ .../nacos/rui-service-starter.yaml | 54 ++----------------- 2 files changed, 3 insertions(+), 68 deletions(-) diff --git a/backend/config-templates/application-template.yml b/backend/config-templates/application-template.yml index 8548490..b7697dc 100644 --- a/backend/config-templates/application-template.yml +++ b/backend/config-templates/application-template.yml @@ -56,23 +56,6 @@ spring: # 无 MyBatis 的模块(gateway)请删除下面这行 - optional:nacos:rui-data.${spring.cloud.nacos.config.file-extension:yaml} -# ============================================================================ -# 模块管理配置(可选,仅在需要管理租户模块时配置) -# 配置位置:Nacos rui-service-starter.yaml 或本模块的 Nacos 配置 -# ============================================================================ -# rui: -# modules: -# # 全局可用模块列表(供租户管理的模块配置弹窗使用) -# available: -# - code: system -# name: 系统管理 -# icon: tabler:settings -# - code: user -# name: 用户管理 -# icon: tabler:users -# # 默认启用模块(新租户默认开启,逗号分隔) -# default-enabled: system,user - management: endpoints: web: diff --git a/backend/config-templates/nacos/rui-service-starter.yaml b/backend/config-templates/nacos/rui-service-starter.yaml index ee8ae91..c17bffc 100644 --- a/backend/config-templates/nacos/rui-service-starter.yaml +++ b/backend/config-templates/nacos/rui-service-starter.yaml @@ -1,12 +1,13 @@ -# rui-service-starter.yaml — 聚合服务启动模块配置 +# rui-service-starter.yaml — 聚合启动器配置 # Data ID: rui-service-starter.yaml # Group: DEFAULT_GROUP +# 功能:聚合 system、user 等模块,统一启动部署 # 服务端口:9399(聚合启动器) server: port: 9399 -# 模块管理配置(全局可用模块列表,供租户管理模块配置使用) +# 模块管理配置(供租户管理模块配置弹窗使用) rui: modules: # 全局可用模块列表(系统层面定义有哪些模块可选) @@ -31,52 +32,3 @@ rui: icon: tabler:device-desktop # 默认启用模块(新租户默认开启,逗号分隔) default-enabled: system,user,demo - -# 数据库配置(聚合模式下复用各模块数据源) -spring: - datasource: - url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/${MYSQL_DB:rui}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true - username: ${MYSQL_USERNAME:root} - password: ${MYSQL_PASSWORD:root} - driver-class-name: com.mysql.cj.jdbc.Driver - hikari: - maximum-pool-size: 20 - minimum-idle: 5 - idle-timeout: 300000 - connection-timeout: 20000 - max-lifetime: 1200000 - -# MyBatis-Plus 配置 -mybatis-plus: - configuration: - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - map-underscore-to-camel-case: true - global-config: - db-config: - logic-delete-field: deleted - logic-delete-value: 1 - logic-not-delete-value: 0 - id-type: auto - mapper-locations: classpath*:/mapper/**/*.xml - -# Redis 配置 -spring: - data: - redis: - host: ${REDIS_HOST:localhost} - port: ${REDIS_PORT:6379} - password: ${REDIS_PASSWORD:} - database: 0 - timeout: 10s - lettuce: - pool: - max-active: 20 - max-idle: 10 - min-idle: 5 - max-wait: 10s - -# 日志配置 -logging: - level: - com.rui: INFO - org.springframework.web: WARN