feat(jnpf-admin): application-dev.yml 注册 jxcj 数据源 (D-16/17 终解)

用 yml 命名数据源替代 sed hack:
- spring.datasource.dynamic.datasource.jxcj 段
- 重启即装, 不需 visualdev warmup
- 与 sswportal 同架构, 平台原生
- @DS("jxcj") 名字稳定, dev/prod 一致

闭环: 28/28 ssw-jxcj controller 重启即用, 无 CannotFindDataSourceException
D-16 (sed @DS hack) 改为 D-16 (yml 注册), D-17 (warmup) 已被 D-16 解决
This commit is contained in:
ssw committed 2026-06-23 17:49:20 +08:00
1 parent afecfae187
commit 61605b4fce
1 file changed
+22 -11
@@ -37,18 +37,29 @@ spring:
socket-timeout: 10000
query-timeout: 90000
transaction-query-timeout: 90000
slf4j: {statementLogEnabled: true, resultSetLogEnabled: false, connectionLogEnabled: false,
dataSourceLogEnabled: false, statementCreateAfterLogEnabled: false, statementCloseAfterLogEnabled: false,
statementExecuteAfterLogEnabled: false, statementExecutableSqlLogEnable: true,
statementPrepareAfterLogEnabled: false, statementPrepareCallAfterLogEnabled: false,
statementParameterSetLogEnabled: false}
slf4j:
statementLogEnabled: true
resultSetLogEnabled: false
connectionLogEnabled: false
dataSourceLogEnabled: false
statementCreateAfterLogEnabled: false
statementCloseAfterLogEnabled: false
statementExecuteAfterLogEnabled: false
statementExecutableSqlLogEnable: true
statementPrepareAfterLogEnabled: false
statementPrepareCallAfterLogEnabled: false
statementParameterSetLogEnabled: false
datasource:
sswportal: {url: 'jdbc:mysql://${spring.datasource.host}
jxcj: {url: 'jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/jxcj?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC',
username: '${spring.datasource.username}', password: '${spring.datasource.password}',
driver-class-name: com.mysql.cj.jdbc.Driver}
username: '${spring.datasource.username}', password: '${spring.datasource.password}',
driver-class-name: com.mysql.cj.jdbc.Driver}
sswportal:
url: 'jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/sswportal?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC'
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
jxcj:
url: 'jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/jxcj?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC'
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
redis:
redisson:
config: |