From 61605b4fce81f7158a23e6b5f1c960c01d49727a Mon Sep 17 00:00:00 2001 From: ssw Date: Tue, 23 Jun 2026 17:49:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(jnpf-admin):=20application-dev.yml=20?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=20jxcj=20=E6=95=B0=E6=8D=AE=E6=BA=90=20(D-16?= =?UTF-8?q?/17=20=E7=BB=88=E8=A7=A3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用 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 解决 --- .../src/main/resources/application-dev.yml | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/jnpf-admin/src/main/resources/application-dev.yml b/jnpf-admin/src/main/resources/application-dev.yml index d68b335..7e0a7ef 100644 --- a/jnpf-admin/src/main/resources/application-dev.yml +++ b/jnpf-admin/src/main/resources/application-dev.yml @@ -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: |