eip4dev: 构建本地开发库,日常开发完全脱离 5435
- tools/local-devdb/build_devdb.sh: 幂等构建脚本,分层 dump/restore (ACT_* schema-only / 超500MB巨表 schema-only / 其余全量), 内置 5435/ceshi 库安全守门,参数化源/目标/阈值/巨表清单 - tools/local-devdb/sql/data-tables.txt: 必须全量的引擎元数据/组织表清单 - tools/local-devdb/本地开发库构建报告.md: 实跑报告(2738MB/345s/94.1%对拍通过) - application-dev.yml: dev profile 指向 localhost:5433/eip4dev,端口 8093 - README.md: 补三套 profile 说明(dev/local/默认)及常用命令 - SysUserService.java: 修复 MASTERDEPART 列不存在导致登录 500 的 bug - docs/迁移手册.md: 追加三条新坑位(MASTERDEPART/sys_page_schema/shell 中文变量名) 验证: 登录 OK / list(1079行) / picker(5条) / ParityCli 1166实体 803 OK_FULL+294 OK_SAMPLE 完全本地: pg_stat_activity 全部连接来自 127.0.0.1:eip4dev,无 5435 连接 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
29
README.md
29
README.md
@@ -18,19 +18,42 @@ EIP4 平台正式工程(路线 A'):双层制模块化单体——**保真层供
|
||||
|
||||
**边界纪律(ArchUnit 强制)**:`com.eip4.*` 可调 `com.dsasp.*`,反向禁止。
|
||||
|
||||
## 三套 profile
|
||||
|
||||
| profile | 数据源 | 端口 | 用途 |
|
||||
|---------|--------|------|------|
|
||||
| **dev**(日常开发) | localhost:5433/eip4dev(真实数据副本) | 8093 | **日常功能开发/联调,完全本地,无需网络** |
|
||||
| **local**(自举) | localhost:5433/eip4m0(极简自举集) | 8084 | CI/对拍/单元测试 |
|
||||
| 默认(验证) | 192.168.20.68:5435/eip3(客户库副本) | 8084 | 验收验证/性能基线,5435 收敛为只读基线 |
|
||||
|
||||
> eip4dev 刷新:`bash tools/local-devdb/build_devdb.sh --drop-target`(约 6 分钟)
|
||||
> 详见:`tools/local-devdb/本地开发库构建报告.md`
|
||||
|
||||
## 常用命令
|
||||
|
||||
```bash
|
||||
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
|
||||
mvn test # 全模块测试(含 ArchUnit)
|
||||
mvn spring-boot:run -pl platform-app -Dspring-boot.run.profiles=local # 本地库(5433/eip4m0)
|
||||
mvn spring-boot:run -pl platform-app # 客户库副本(5435,只读使用)
|
||||
|
||||
# dev profile — 日常开发(真实数据副本 eip4dev,端口 8093)
|
||||
mvn spring-boot:run -pl platform-app -Dspring-boot.run.profiles=dev
|
||||
|
||||
# local profile — 自举最小集(CI/对拍,端口 8084)
|
||||
mvn spring-boot:run -pl platform-app -Dspring-boot.run.profiles=local
|
||||
|
||||
# 默认 profile — 客户库副本 5435(验证用)
|
||||
mvn spring-boot:run -pl platform-app
|
||||
|
||||
# 构建/刷新本地开发库 eip4dev(幂等,约 6 分钟)
|
||||
bash tools/local-devdb/build_devdb.sh --drop-target
|
||||
|
||||
# 对拍(详见 platform-parity/C1实测报告.md)
|
||||
CP="platform-parity/target/classes:$(mvn -q org.apache.maven.plugins:maven-dependency-plugin:build-classpath -pl platform-parity -Dmdep.outputFile=/dev/stdout -o | tail -1)"
|
||||
java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli --all # 本地全量
|
||||
java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli --privilege # C2 数据权限样本
|
||||
# 客户库:--jdbc=... --user=... --pass=... [--sampleRows=N --perPage=N]
|
||||
# 指向 eip4dev 自对拍:
|
||||
mvn -pl platform-parity exec:java -Dexec.mainClass="com.eip4.platform.parity.selfcheck.ParityCli" \
|
||||
"-Dexec.args=--discover --jdbc=jdbc:postgresql://localhost:5433/eip4dev?currentSchema=eip3 --engine=http://localhost:8093 --out=parity-reports/eip4dev"
|
||||
```
|
||||
|
||||
## tools/
|
||||
|
||||
Reference in New Issue
Block a user