SpringCloud-9-Spring Cloud Feign的日志和超时

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;
    }

}

 

posted @ 2020-09-04 16:38  洋三岁  阅读(145)  评论(0)    收藏  举报
友情链接: 梦想农夫