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:
2026-06-11 18:19:01 +08:00
parent b9ad18f147
commit d137577759
7 changed files with 580 additions and 6 deletions

View File

@@ -0,0 +1,37 @@
# ============================================================================
# Spring profile「dev」—— 本地真实数据副本开发环境
# 启动:mvn spring-boot:run -Dspring-boot.run.profiles=dev
# 或:java -jar ... --spring.profiles.active=dev
# 数据源指向本地 PG15(localhost:5433/eip4dev),真实数据副本,完全脱离 5435。
# 刷新库:bash tools/local-devdb/build_devdb.sh --drop-target
#
# 三套 profile 说明:
# dev 本地真实数据副本(eip4dev),日常功能开发、联调,完全本地,无需网络
# local 本地自举最小集(eip4m0),CI/对拍/单元测试,数据极简
# 默认 指向客户库副本 5435,验收验证/性能基线用,需网络
# ============================================================================
spring:
datasource:
url: jdbc:postgresql://localhost:5433/eip4dev?currentSchema=eip3
username: zhengwr
password:
hikari:
maximum-pool-size: 10
read-only: false
server:
port: 8093
eip4:
auth:
jwt:
secret: ${EIP4_AUTH_JWT_SECRET:dev-only-eip4-jwt-secret-change-me-in-production-0123456789}
expire-seconds: 28800 # 8h
issuer: eip4-platform
file:
root: ${EIP4_FILE_ROOT:./data/files}
logging:
level:
com.dsasp: DEBUG
org.springframework.jdbc.core: DEBUG