Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#] 没有引用okhttp依赖包,feign切换httpclient线程池 #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions zlt-config/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
########################## application级别通用配置 ##########################
##### loadbalancer配置
## 切换实例的重试
########################## application\u7EA7\u522B\u901A\u7528\u914D\u7F6E ##########################
##### loadbalancer\u914D\u7F6E
## \u5207\u6362\u5B9E\u4F8B\u7684\u91CD\u8BD5
spring.cloud.loadbalancer.retry.enabled=false

##### feign配置
##### feign\u914D\u7F6E
feign.sentinel.enabled=true
feign.hystrix.enabled=false
feign.okhttp.enabled=true
feign.httpclient.enabled=false
feign.okhttp.enabled=false
feign.httpclient.enabled=true
feign.httpclient.max-connections=1000
feign.httpclient.max-connections-per-route=100
feign.client.config.feignName.connectTimeout=30000
feign.client.config.feignName.readTimeout=30000
## 开启Feign请求响应压缩
## \u5F00\u542FFeign\u8BF7\u6C42\u54CD\u5E94\u538B\u7F29
feign.compression.request.enabled=true
feign.compression.response.enabled=true
## 配置压缩文档类型及最小压缩的文档大小
## \u914D\u7F6E\u538B\u7F29\u6587\u6863\u7C7B\u578B\u53CA\u6700\u5C0F\u538B\u7F29\u7684\u6587\u6863\u5927\u5C0F
feign.compression.request.mime-types=text/xml,application/xml,application/json
feign.compression.request.min-request-size=2048


##### sentinel配置
##### sentinel\u914D\u7F6E
spring.cloud.sentinel.transport.dashboard=${zlt.sentinel.dashboard}
spring.cloud.sentinel.eager=true


##### druid配置
#连接池配置(通常来说,只需要修改initialSize、minIdle、maxActive
##### druid\u914D\u7F6E
#\u8FDE\u63A5\u6C60\u914D\u7F6E(\u901A\u5E38\u6765\u8BF4\uFF0C\u53EA\u9700\u8981\u4FEE\u6539initialSize\u3001minIdle\u3001maxActive
spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=500
spring.datasource.druid.min-idle=10
# 配置获取连接等待超时的时间
# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4
spring.datasource.druid.max-wait=60000
#打开PSCache,并且指定每个连接上PSCache的大小
#\u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
spring.datasource.druid.validation-query=SELECT 'x'
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-on-return=false
spring.datasource.druid.test-while-idle=true
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
#\u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.time-between-eviction-runs-millis=60000
#配置一个连接在池中最小生存的时间,单位是毫秒
#\u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.min-evictable-idle-time-millis=300000
spring.datasource.druid.filters=stat,wall
# WebStatFilter配置,说明请参考Druid Wiki,配置_配置WebStatFilter
#是否启用StatFilter默认值true
# WebStatFilter\u914D\u7F6E\uFF0C\u8BF4\u660E\u8BF7\u53C2\u8003Druid Wiki\uFF0C\u914D\u7F6E_\u914D\u7F6EWebStatFilter
#\u662F\u5426\u542F\u7528StatFilter\u9ED8\u8BA4\u503Ctrue
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.web-stat-filter.url-pattern=/*
spring.datasource.druid.web-stat-filter.exclusions="*.js , *.gif ,*.jpg ,*.png ,*.css ,*.ico , /druid/*"
spring.datasource.druid.web-stat-filter.session-stat-max-count=1000
spring.datasource.druid.web-stat-filter.profile-enable=true
spring.datasource.druid.web-stat-filter.session-stat-enable=false
# StatViewServlet配置
#展示Druid的统计信息,StatViewServlet的用途包括:1.提供监控信息展示的html页面2.提供监控信息的JSON API
#是否启用StatViewServlet默认值true
# StatViewServlet\u914D\u7F6E
#\u5C55\u793ADruid\u7684\u7EDF\u8BA1\u4FE1\u606F,StatViewServlet\u7684\u7528\u9014\u5305\u62EC\uFF1A1.\u63D0\u4F9B\u76D1\u63A7\u4FE1\u606F\u5C55\u793A\u7684html\u9875\u97622.\u63D0\u4F9B\u76D1\u63A7\u4FE1\u606F\u7684JSON API
#\u662F\u5426\u542F\u7528StatViewServlet\u9ED8\u8BA4\u503Ctrue
spring.datasource.druid.stat-view-servlet.enabled=true
#根据配置中的url-pattern来访问内置监控页面,如果是上面的配置,内置监控页面的首页是/druid/index.html例如:http://127.0.0.1:9000/druid/index.html
#\u6839\u636E\u914D\u7F6E\u4E2D\u7684url-pattern\u6765\u8BBF\u95EE\u5185\u7F6E\u76D1\u63A7\u9875\u9762\uFF0C\u5982\u679C\u662F\u4E0A\u9762\u7684\u914D\u7F6E\uFF0C\u5185\u7F6E\u76D1\u63A7\u9875\u9762\u7684\u9996\u9875\u662F/druid/index.html\u4F8B\u5982\uFF1Ahttp://127.0.0.1:9000/druid/index.html
spring.datasource.druid.stat-view-servlet.url-pattern=/druid/*
#允许清空统计数据
#\u5141\u8BB8\u6E05\u7A7A\u7EDF\u8BA1\u6570\u636E
spring.datasource.druid.stat-view-servlet.reset-enable=true
spring.datasource.druid.stat-view-servlet.login-username=admin
spring.datasource.druid.stat-view-servlet.login-password=admin


##### mybatis-plus配置
#字段策略 IGNORED:"忽略判断",NOT_NULL:" NULL 判断"),NOT_EMPTY:"非空判断"
##### mybatis-plus\u914D\u7F6E
#\u5B57\u6BB5\u7B56\u7565 IGNORED:"\u5FFD\u7565\u5224\u65AD",NOT_NULL:"\u975E NULL \u5224\u65AD"),NOT_EMPTY:"\u975E\u7A7A\u5224\u65AD"
mybatis-plus.global-config.db-config.field-strategy=NOT_NULL
#逻辑删除配置
#\u903B\u8F91\u5220\u9664\u914D\u7F6E
mybatis-plus.global-config.db-config.logic-delete-value=1
mybatis-plus.global-config.db-config.logic-not-delete-value=0
# 原生配置
# \u539F\u751F\u914D\u7F6E
mybatis-plus.configuration.map-underscore-to-camel-case=true
mybatis-plus.configuration.cache-enabled=false


##### redis配置
# 连接池最大连接数(使用负值表示没有限制)
##### redis\u914D\u7F6E
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.lettuce.pool.max-active=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.lettuce.pool.max-wait=-1
# 连接池中的最大空闲连接
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
spring.redis.lettuce.pool.max-idle=8
# 连接池中的最小空闲连接
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
spring.redis.lettuce.pool.min-idle=0

##### logging配置
logging.level.com.alibaba.nacos.client.naming=warn
##### logging\u914D\u7F6E
logging.level.com.alibaba.nacos.client.naming=warn