application.yaml 3.0 KB
Newer Older
Q
qinyingjie 已提交
1 2
server:
  port: 8761
Q
qinyingjie 已提交
3 4 5 6 7
  servlet:
    encoding:
      force: true
      charset: UTF-8
      enabled: true
Q
qinyingjie 已提交
8 9

swagger:
Q
qinyingjie 已提交
10 11
  enable: true

Q
qinyingjie 已提交
12
#兼容swagger配置
Q
qinyingjie 已提交
13
spring:
14 15
  application:
    name: spring-boot-name
Q
qinyingjie 已提交
16 17 18 19 20 21 22 23
  #项目启动时创建数据表的 SQL 脚本,该脚本由 Spring Batch 提供
  #spring.datasource.schema=classpath:/org/springframework/batch/core/schema-mysql.sql
  # 在项目启动时执行建表 SQL
  batch:
    initialize-schema: always
    # 禁止 Spring Batch 自动执行,在 SpringBoot 中,默认情况,当项目启动时就会执行配置好的批理操作,添加了该配置后则不会自动执行,而需要用户手动触发执行
    job:
      enabled: false
Q
qinyingjie 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36
  mail:
    host: smtp.qq.com
    # 发送者的邮箱账号
    username: 327782001@qq.com
    # 邮箱密码授权码
    password: kypxnmwfniqrcbeh
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
            required: true
Q
qinyingjie 已提交
37 38 39 40 41 42 43 44 45 46 47
  redis:
    database: 0 # Redis数据库索引(默认为0)
    host: 120.79.36.53  #Redis服务器地址
    port: 6379 # Redis服务器连接端口
    password: # Redis服务器连接密码(默认为空)
    jedis:
      pool:
        max-active: 200 # 连接池最大连接数(使用负值表示没有限制)
        max-idle: 10 # 连接池中的最大空闲连接
        min-idle: 0 # 连接池中的最小空闲连接
        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
Q
qinyingjie 已提交
48 49
  mvc:
    pathmatch:
Q
qinyingjie 已提交
50 51 52
      matching-strategy: ant_path_matcher
  # mysql
  datasource:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
    dynamic:
      seata: true
      primary: kwan-ds
      datasource:
        kwan-ds:
          driver-class-name: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://localhost:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
          username: root
          password: 716288qwe
        ali-ds:
          driver-class-name: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://120.79.36.53:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
          username: root
          password: 15671628341Qwe.

Q
qinyingjie 已提交
68

69 70
seata:
  application-id: spring-boot-name
71
  tx-service-group: my-tx-group
72 73
  service:
    vgroup-mapping:
74
      my-tx-group: seata-server
75
    grouplist:
76 77
      seata-server: 127.0.0.1:8091
  enabled: true
78 79 80



Q
qinyingjie 已提交
81
#mybatis-plus配置
Q
qinyingjie 已提交
82 83
mybatis-plus:
  configuration:
Q
qinyingjie 已提交
84 85 86
    map-underscore-to-camel-case: true
    call-setters-on-nulls: true
    auto-mapping-behavior: full
Q
qinyingjie 已提交
87
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
88 89
#    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl  #关闭sql日志

Q
qinyingjie 已提交
90 91 92 93 94 95 96 97 98
  mapper-locations: classpath*:mapper/**/*Mapper.xml
  global-config:
    banner: false
    # 逻辑删除配置
    db-config:
      id-type: AUTO
      logic-delete-field: delFlag
      logic-delete-value: 1
      logic-not-delete-value: 0
Q
qinyingjie 已提交
99 100 101 102 103
      table-underline: true

#logger配置
logging:
  config: classpath:logback-spring.xml