spring: datasource: primary: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:13306/JavaSecLab?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true username: root password: QWE123qwe druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 30000 validation-query: SELECT 1 FROM DUAL test-while-idle: true time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 300000 pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 log-abandoned: true remove-abandoned: true secondary: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:13306/JavaSecLab?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true username: root password: QWE123qwe druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 30000 validation-query: SELECT 1 FROM DUAL test-while-idle: true time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 300000 pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 log-abandoned: true remove-abandoned: true jpa: database-platform: org.hibernate.dialect.MySQLDialect show-sql: true hibernate: ddl-auto: update properties: hibernate: format_sql: true session_factory_name: sessionFactory session_factory_name_is_jndi: false current_session_context_class: thread transaction: auto_close_session: true connection: provider_disables_autocommit: true generate_statistics: true jdbc: time_zone: UTC session: events: log: LOG_QUERIES_SLOWER_THAN_MS: 0 flush_mode: AUTO default_schema: JavaSecLab default_catalog: JavaSecLab logging: level: root: INFO # 默认日志级别 com.alibaba.druid.pool: DEBUG # 启用 Druid 的 DEBUG 日志(排查数据库连接池问题时启用) org.hibernate.SQL: DEBUG # 启用 Hibernate SQL 日志 org.hibernate.type.descriptor.sql.BasicBinder: TRACE # 启用 Hibernate 参数绑定日志