spring:
application:
name: goods-service
config:
import: consul:${consul.host:localhost}:${consul.port:8500}
profiles:
active: development-local
codec:
max-in-memory-size:
-1
cloud:
config:
override-none: true
consul:
discovery:
prefer-ip-address: true
health-check-critical-timeout: 30s
config:
enabled: true
prefixes:
- ydyun360-config
format: yaml
default-context: ${spring.application.name}
watch:
enabled: false
loadbalancer:
ribbon:
enabled: true
stream:
kafka:
binder:
auto-add-partitions: false
auto-create-topics: false
bindings:
log-service-topic-output: # 消息订阅通道
destination: log-service-topic # topic
contentType: application/json
producer:
partition-key-expression: headers['partitionKey']
partition-count: 2
default-binder: kafka
cache:
redis:
key-prefix: ${spring.application.name}
time-to-live: 0
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone:
Asia/Shanghai
datasource:
type: com.zaxxer.hikari.HikariDataSource
hikari:
data-source-properties:
cachePrepStmts: true
prepStmtCacheSize: 500
prepStmtCacheSqlLimit: 2048
useServerPrepStmts: true
rewriteBatchedStatements: true
cacheResultSetMetadata: true
cacheServerConfiguration: true
elideSetAutoCommits: true
maintainTimeStats: false
logging:
level:
root: INFO
file:
name: logs/${spring.application.name}.log
server:
http2:
enabled: true
compression:
enabled: true
mime-types: application/json,application/xml,text/html,text/javascript,text/css,text/xml,text/plain
min-response-size: 2048
port: 8007
Spring Cloud 2020.0.2配置
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 除了使用 git 作为配置文件的管理中心外,也可以使用关系型数据库、非关系型数据库实现配置中心,以及配置中心的扩展...
- 本地参数覆盖远程参数 allow-override:标识 override-system-properties 是...
- 第八章 教学评价 第一节 从考试文化走向评价文化 一、教学评价的早期发展 (一)传统考试阶段 ★《学记》——我国最...
- 今天青石的票圈出镜率最高的,莫过于张艺谋的新片终于定档了。 一张满溢着水墨风的海报一次次的出现在票圈里,也就是老谋...