1
zj
2024-06-03 09206aedcfdf30050123e99f2af0a192ebad1de4
src/main/resources/application.yml
@@ -63,21 +63,7 @@
    time-zone: Asia/Kolkata
  profiles:
    active: druid
  flyway:
    enabled: true
    # 禁止清理数据库表
    clean-disabled: false
    # 如果数据库不是空表,需要设置成 true,否则启动报错
    baseline-on-migrate: true
    # 与 baseline-on-migrate: true 搭配使用
    baseline-version: 0
    #数据库连接配置
    url: ${spring.datasource.url}
    user: ${spring.datasource.username}
    password: ${spring.datasource.password}
    locations: classpath:db/migration/ #(根据个人情况设置,多个路径使用逗号分隔)
    #版本控制日志表,默认flyway_schema_history
    table: flyway_schema_history
  # 文件上传
  servlet:
    multipart:
@@ -100,10 +86,9 @@
  # redis 配置
  redis:
    # 地址
    host: 127.0.0.1
    host: localhost
    # 端口,默认为6379
    port: 6380
#    port: todo: 6380
    port: 6379
    # 数据库索引
    database: 0
    # 密码
@@ -123,19 +108,17 @@
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: com.mysql.cj.jdbc.Driver
#   todo: 6306
    url: jdbc:mysql://127.0.0.1:6306/stock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
    url: jdbc:mysql://127.0.0.1:3306/stock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#    url: jdbc:mysql://127.0.0.1:3306/cgstock?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
    username: root
    password: Err;2[eoGFUriwdgr
#    password: 123456
    password: 123456
    druid:
      # 初始连接数
      initialSize: 5
      # 最小连接池数量
      minIdle: 10
      # 最大连接池数量
      maxActive: 20
      maxActive: 50
      # 配置获取连接等待超时的时间
      maxWait: 60000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒