前言
feign默认使用urlConnection,没有连接池
一、加依赖
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
</dependency>
二、改yml
feign:
client:
config:
default: #全局
loggerLevel: full
httpclient:
#让feign使用httpclient做请求;而不是urlConnection
enabled: true
#feign的最大链接数
max-connections: 200
#fegin的单个路径最大连接数
max-connections-per-route: 50