refactor(modules): rename modules and externalize config / 重命名模块并外置配置

Rename Maven modules and directories to seewis-* while preserving Java package paths. Allow Nacos and Logstash settings from environment variables or Maven -D overrides, and include the existing agent documentation updates.
This commit is contained in:
2026-09-01 15:04:46 +08:00
parent 816cba997a
commit 93d3e71e0b
1097 changed files with 729 additions and 725 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
---
name: backend-cloud
description: Cloud 后端专家。用于当前 RuoYi-Cloud-Plus 项目中的 Dubbo 远程调用、ruoyi-api 契约、服务拆分、Gateway/Auth、Nacos、Seata 分布式事务、服务间数据权限透传和 mock/stub 降级。
description: Cloud 后端专家。用于当前 RuoYi-Cloud-Plus 项目中的 Dubbo 远程调用、seewis-api 契约、服务拆分、Gateway/Auth、Nacos、Seata 分布式事务、服务间数据权限透传和 mock/stub 降级。
---
你负责 Cloud 架构相关的增量修改。
@@ -9,21 +9,21 @@ description: Cloud 后端专家。用于当前 RuoYi-Cloud-Plus 项目中的 Dub
1. 先读 `.codex/skills/ruoyi-plus-ai-coding/references/cloud.md`。
2. 再读目标远程接口、provider 实现、consumer 调用点、mock/stub 和 pom 依赖。
3. 服务间能力优先通过 `ruoyi-api-*` 的 `RemoteXxxService` 契约暴露,不跨模块直接注入对方 mapper/service/entity。
3. 服务间能力优先通过 `seewis-api-*` 的 `RemoteXxxService` 契约暴露,不跨模块直接注入对方 mapper/service/entity。
4. 修改远程接口签名时同步检查所有 `@DubboReference`、`@DubboService`、mock/stub、转换器和调用点。
5. 跨服务写入检查 `@GlobalTransactional`,弱依赖副作用检查 Dubbo mock/stub 降级。
## Dubbo 规则
- Provider 放在业务模块 `dubbo` 包,命名 `RemoteXxxServiceImpl`,通常使用 `@RequiredArgsConstructor`、`@Service`、`@DubboService`。
- Consumer 使用 `@DubboReference` 注入 `ruoyi-api-*` 中的 `RemoteXxxService`。
- Consumer 使用 `@DubboReference` 注入 `seewis-api-*` 中的 `RemoteXxxService`。
- 可选能力按已有模式使用 `@DubboReference(mock = "true")` 或 `@DubboReference(stub = "true")`。
- 批量查询、翻译、流程候选人、消息推送等场景不要在循环中逐条远程调用。
- 远程 DTO 使用 `RemoteXxxBo`、`RemoteXxxVo`、`RemoteXxx`,不要泄露内部 Entity。
## Gateway / Auth / Nacos
- Auth 相关逻辑优先查 `ruoyi-auth` 和 `ruoyi-gateway`,不要把 token 签发、客户端校验、网关白名单散落到业务模块。
- Auth 相关逻辑优先查 `seewis-auth` 和 `seewis-gateway`,不要把 token 签发、客户端校验、网关白名单散落到业务模块。
- Gateway 的 Sa-Token 校验、客户端 ID 匹配、访问路径/IP 白名单、same-token、`X-Forwarded-Prefix` 透传要保持原有 filter order。
- 配置优先走 Nacos:`application-common.yml` 和 `${spring.application.name}.yml`,不要把环境差异硬编码到代码。
@@ -1,9 +1,9 @@
---
name: backend-common-infrastructure
description: 公共基础模块专家。用于修改 ruoyi-common 下的 mybatis、translation、json enhance、excel、oss、redis、web、encrypt、dubbo、seata 等公共能力,强调 API 兼容、调用点检查和同包风格一致。
description: 公共基础模块专家。用于修改 seewis-common 下的 mybatis、translation、json enhance、excel、oss、redis、web、encrypt、dubbo、seata 等公共能力,强调 API 兼容、调用点检查和同包风格一致。
---
你负责 `ruoyi-common` 公共基础模块的增量修改。
你负责 `seewis-common` 公共基础模块的增量修改。
## 核心原则
+1 -1
View File
@@ -7,7 +7,7 @@ description: 标准后端 CRUD 专家。用于当前项目中的新增单表 CRU
## 核心原则
1. 先参考 `ruoyi-modules/ruoyi-gen/src/main/resources/vm/` 下的模板。
1. 先参考 `seewis-modules/seewis-gen/src/main/resources/vm/` 下的模板。
2. 再参考当前模块内最近似的标准管理模块。
3. 分层保持稳定:
`domain`、`domain.bo`、`domain.vo`、`mapper`、`service`、`service.impl`、`controller`
+3 -3
View File
@@ -9,16 +9,16 @@ description: 后端工程总入口。用于在当前 RuoYi-Cloud-Plus 项目中
1. 如果是新增标准单表 CRUD、从表结构补 entity/bo/vo/mapper/service/controller,优先使用 `backend-crud.md` 的规则。
2. 如果是修改 `system`、`workflow` 等已经很复杂的模块,优先使用 `backend-module-enhancement.md` 的规则。
3. 如果涉及 Cloud 专属能力,例如 Dubbo、`ruoyi-api` 远程契约、Gateway、Nacos、Seata、服务间调用或服务边界,优先使用 `backend-cloud.md` 的规则。
3. 如果涉及 Cloud 专属能力,例如 Dubbo、`seewis-api` 远程契约、Gateway、Nacos、Seata、服务间调用或服务边界,优先使用 `backend-cloud.md` 的规则。
4. 如果重点在 MPJ 联表、`@DataPermission`、复杂查询、数据范围控制,优先使用 `backend-query-permission.md` 的规则。
5. 如果是修改 `ruoyi-common` 公共基础能力,例如 `common-mybatis`、`common-translation`、`common-json`、`common-excel`、`common-oss`、`common-dubbo`、`common-seata`,优先使用 `backend-common-infrastructure.md` 的规则。
5. 如果是修改 `seewis-common` 公共基础能力,例如 `common-mybatis`、`common-translation`、`common-json`、`common-excel`、`common-oss`、`common-dubbo`、`common-seata`,优先使用 `backend-common-infrastructure.md` 的规则。
6. 如果只要求补充或修正 JavaDoc 注释,优先使用 `backend-javadoc.md` 的规则。
7. 如果同时要求同步前端接口或前端页面骨架,保持后端路由与 generator 风格稳定,便于前端 agent 对接。
文档读取顺序:
- 后端 Java、Mapper、Service、Controller、BO、VO、Entity、权限、查询、公共模块或 JavaDoc 任务,先读 `.codex/skills/ruoyi-plus-ai-coding/references/backend.md`。
- Dubbo 远程调用、`ruoyi-api` 契约、服务拆分、Gateway、Nacos、Seata、服务间数据权限透传任务,先读 `.codex/skills/ruoyi-plus-ai-coding/references/cloud.md`。
- Dubbo 远程调用、`seewis-api` 契约、服务拆分、Gateway、Nacos、Seata、服务间数据权限透传任务,先读 `.codex/skills/ruoyi-plus-ai-coding/references/cloud.md`。
- 同步前端 Vue、TypeScript、api、types 或页面骨架时,再读 `.codex/skills/ruoyi-plus-ai-coding/references/frontend.md`。
- 任务边界不清晰或需要标准场景示例时,再读 `.codex/skills/ruoyi-plus-ai-coding/references/examples.md`。
- 只读取当前任务相关的 reference,不一次性展开全部文档。
+1 -1
View File
@@ -32,7 +32,7 @@ description: 后端查询、联表与数据权限专家。用于当前项目中
- MPJ 联表查询沿用别名风格,例如 `QueryBuilder.lambdaJoin("u", SysUser.class)`。
- 带别名字段条件使用 `.eq("u", Entity::getField, value)`、`.orderByAsc("m", SysMenu::getOrderNum)`。
- 数据权限列名要和真实 SQL 别名一致,例如 `d.dept_id`、`u.create_by`。
- `ruoyi-system` 的用户、角色、菜单、部门查询常带角色状态、删除标识、部门权限过滤,修改前先读对应 mapper/service。
- `seewis-system` 的用户、角色、菜单、部门查询常带角色状态、删除标识、部门权限过滤,修改前先读对应 mapper/service。
- 日期范围参数继续从 `bo.getParams()` 获取,避免前端 `addDateRange` 对不上。
- 简单查询默认留在 service wrapper;短小且复用性强的 mapper 默认方法可以保留在 mapper。