springboot配置文件中数据库相关的配置

spring:
  datasource:
    username: root
    password: ob0oQfJ9LOeKrSYGhkIR/gFijjKBRE1lw1v/DBZ3LCl8IrOvQ48zxObQM7eX1z9oeIkTQE/c1lULWl9C9dV/Hg==
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/xxx?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false
    type: com.alibaba.druid.pool.DruidDataSource
#使用druid连接池
    druid:
      initial-size: 20
      min-idle: 20
      connectionProperties: config.decrypt=true;config.decrypt.key=${publicKey};
      max-active: 100
      max-wait: 60000
      stat-view-servlet:
        enabled: true
        url-pattern: /druid/*
        login-username: admin
        login-password: 123456
      filter:
        stat:
          enabled: true
          slow-sql-millis: 2000
          log-slow-sql: true
        wall:
          enabled: true
        config:
          enabled: true
          #密码加密
publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKaUBTghRi4PRTC29zi7aRVcl5PwSsKu8PLFF7tIGjO+1thHp2SQZSS1QFb5bkiX/2b6YqKAxnt5m6+l4CR4X5UCAwEAAQ==

数据库相关配置以及druid连接池相关配置

你可能感兴趣的:(SSM框架,spring,boot,mybatis,后端,数据库,spring)