blade.yaml
#服務器配置
server:
undertow:
# 設置IO線程數, 它主要執行非阻塞的任務,它們會負責多個連接, 默認設置每個CPU核心一個線程
io-threads: 4
# 阻塞任務線程池, 當執行類似servlet請求阻塞操作, undertow會從這個線程池中取得線程,它的值設置取決於系統的負載
worker-threads: 20
# 以下的配置會影響buffer,這些buffer會用於服務器連接的IO操作,有點類似netty的池化內存管理
buffer-size: 1024
# 是否分配的直接內存
direct-buffers: true
server:
undertow:
# 設置IO線程數, 它主要執行非阻塞的任務,它們會負責多個連接, 默認設置每個CPU核心一個線程
io-threads: 4
# 阻塞任務線程池, 當執行類似servlet請求阻塞操作, undertow會從這個線程池中取得線程,它的值設置取決於系統的負載
worker-threads: 20
# 以下的配置會影響buffer,這些buffer會用於服務器連接的IO操作,有點類似netty的池化內存管理
buffer-size: 1024
# 是否分配的直接內存
direct-buffers: true
#spring配置
spring:
devtools:
restart:
log-condition-evaluation-delta: false
livereload:
port: 23333
spring:
devtools:
restart:
log-condition-evaluation-delta: false
livereload:
port: 23333
#feign配置
feign:
hystrix:
enabled: true
#sentinel:
#enabled: true
okhttp:
enabled: true
httpclient:
enabled: false
feign:
hystrix:
enabled: true
#sentinel:
#enabled: true
okhttp:
enabled: true
httpclient:
enabled: false
#hystrix配置
hystrix:
threadpool:
default:
coreSize: 300
maxQueueSize: 1000
queueSizeRejectionThreshold: 800
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
hystrix:
threadpool:
default:
coreSize: 300
maxQueueSize: 1000
queueSizeRejectionThreshold: 800
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 5000
#ribbon配置
ribbon:
#對當前實例的重試次數
MaxAutoRetries: 1
#切換實例的重試次數
MaxAutoRetriesNextServer: 2
#請求處理的超時時間
ReadTimeout: 60000
#請求連接的超時時間
ConnectTimeout: 60000
#對所有操作請求都進行重試
OkToRetryOnAllOperations: true
ribbon:
#對當前實例的重試次數
MaxAutoRetries: 1
#切換實例的重試次數
MaxAutoRetriesNextServer: 2
#請求處理的超時時間
ReadTimeout: 60000
#請求連接的超時時間
ConnectTimeout: 60000
#對所有操作請求都進行重試
OkToRetryOnAllOperations: true
#對外暴露端口
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: always
#blade配置
blade:
xss:
url:
exclude-patterns:
- /weixin
secure:
url:
exclude-patterns:
- /test/**
client:
- client-id: sword
path-patterns:
- /sword/**
- client-id: saber
path-patterns:
- /saber/**
tenant:
column: tenant_id
tables:
- blade_notice
blade:
xss:
url:
exclude-patterns:
- /weixin
secure:
url:
exclude-patterns:
- /test/**
client:
- client-id: sword
path-patterns:
- /sword/**
- client-id: saber
path-patterns:
- /saber/**
tenant:
column: tenant_id
tables:
- blade_notice
==============================
blade-dev.yaml
#spring配置
spring:
redis:
##redis 單機環境配置
host: localhost
port: 6379
password:
database: 0
ssl: false
##redis 集群環境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
spring:
redis:
##redis 單機環境配置
host: localhost
port: 6379
password:
database: 0
ssl: false
##redis 集群環境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
#項目模塊集中配置
blade:
#通用開發生產環境數據庫地址(特殊情況可在對應的子工程里配置覆蓋)
datasource:
dev:
url: jdbc:mysql://localhost:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
document:
resources:
- name: 授權模塊
location: /blade-auth
- name: 工作台模塊
location: /blade-desk
- name: 系統模塊
location: /blade-system
blade:
#通用開發生產環境數據庫地址(特殊情況可在對應的子工程里配置覆蓋)
datasource:
dev:
url: jdbc:mysql://localhost:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
document:
resources:
- name: 授權模塊
location: /blade-auth
- name: 工作台模塊
location: /blade-desk
- name: 系統模塊
location: /blade-system
=================================================================
blade-flow-dev.yaml
#項目模塊集中配置
blade:
#工作流模塊開發生產環境數據庫地址
datasource:
flow:
dev:
url: jdbc:mysql://localhost:3306/bladex_flow?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: root
特別注意:以上配置文件中的密碼如果使用!符號開始,可能會導致bladex服務無法啟動
