Spring Cloud Feign
解决调用超时
ribbon:
#指建立连接的超时时间 注意大小写
ReadTimeout: 5000
#指建立连接后从服务器读取到可用资源的时间
ConnectTimeout: 5000
增强日志
logging:
level:
com.mengxiangnongfu.*: debug
package com.mengxiangnongfu.config;
import feign.Logger;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FeignConfig {
@Bean
Logger.Level feignLoggerLevel() {
//打印最全的log
return Logger.Level.FULL;
}
}