application-sys.yml 4.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#缓存、数据源
spring:
  jackson:
    time-zone: GMT+8
  cache:
    redis:
      time-to-live: 72000
    caffeine:
      spec: initialCapacity=5,maximumSize=500,expireAfterWrite=72000s
  redis:
    host: 172.16.240.110
    port: 6379
    password:
    database: 0
    lettuce:
      pool:
        max-active: 32
        max-wait: 300ms
        max-idle: 16
        min-idle: 8
  servlet:
    multipart:
      max-file-size: 100MB
      max-request-size: 100MB
  datasource:
26 27 28
    username: a_LAB01_d23cc850e
    password: 'f9Df4556'
    url: jdbc:mysql://172.16.186.185:3306/a_LAB01_d23cc850e?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&serverTimezone=Asia/Shanghai&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
29 30
    driver-class-name: com.mysql.jdbc.Driver
    isSyncDBSchema: false
31
    defaultSchema: a_LAB01_d23cc850e
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
    dynamic:
      druid: #以下是全局默认值,可以全局更改
        filters: stat,wall,log4j2
        #配置初始化大小/最小/最大
        initial-size: 1
        min-idle: 1
        max-active: 20
        #获取连接等待超时时间
        max-wait: 60000
        #间隔多久进行一次检测,检测需要关闭的空闲连接
        time-between-eviction-runs-millis: 60000
        #一个连接在池中最小生存的时间
        min-evictable-idle-time-millis: 300000
        validation-query: SELECT 1 FROM DUAL
        test-while-idle: true
        test-on-borrow: false
        test-on-return: false
        #打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false
        pool-prepared-statements: false
        max-pool-prepared-statement-per-connection-size: 20
      datasource:
        master:
          username: ${spring.datasource.username}
          password: ${spring.datasource.password}
          url: ${spring.datasource.url}
          driver-class-name: ${spring.datasource.driver-class-name}
  #启动是否加载liquibase构建表结构
  liquibase:
    enabled: false
    change-log: classpath:liquibase/master_table.xml

# Mybatis-plus配置
mybatis-plus:
  global-config:
    refresh-mapper: true
    db-config:
      # 全局逻辑已删除默认值
      logic-delete-value: 0
      # 全局逻辑未删除默认值
      logic-not-delete-value: 1
#   mapper-locations: classpath*:/mapper/*/*/*.xml
  configuration:
    jdbc-type-for-null: 'null'
    map-underscore-to-camel-case: false
  type-handlers-package: net.ibizsys.central.plugin.mybatisplus.spring.typehandler

# 阿里sentinel熔断器
feign:
  httpclient:
    enabled: true
  sentinel:
    enabled: true
  compression:
    request:
      enabled: true
      mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
      min-response-size: 10240
    response:
      enabled: true

#zuul网关超时设置
ribbon:
  ReadTimeout: 60000
  ConnectTimeout: 60000
  
#Log配置
logging:
  level:
    net.ibizsys.central.database.mybatis: INFO
    org.springframework.boot.autoconfigure: ERROR

#系统是否开启权限验证、是否开启缓存
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz:
  db:
    batchsize: 2000
  auth:
    excludesPattern: /v7/login,/uaa/login,/uaa/loginbyusername,/uaa/casproxylogin
  enablePermissionValid: true
  cacheLevel: L2 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
  deploysystems:
    - deploysystemobj: cn.ibizlab.trainsys.core.runtime.SystemRuntime
      deploysystemid: TrainSys
#      fromjar: false
#      modelpath: model
      fromjar: true
      modelpath: model--23D878A4-E43A-41F7-8D72-6C24B47945F9--1
      db: master

# jobs:
#   admin-address: http://127.0.0.1:40005
#   app-name: TrainSys
#   app-port: 9999
#   app-ip: 127.0.0.1

### 启用Gzip压缩
server:
 compression:
   enabled: true
   mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
   min-response-size: 10240