These are chat archives for spring-cloud/spring-cloud

8th
Oct 2018
Ziemowit
@Ziemowit
Oct 08 2018 07:31

Hey @TYsewyn and @RobMaskell .
It seems my issue was because of that [bug] (spring-cloud/spring-cloud-gateway#361)

Below @Configuration is fixing our issue:

@Configuration
class NettyHttpClientConfiguration {

  @Bean
  HttpClient httpClient(@Qualifier("nettyClientOptions") Consumer<? super HttpClientOptions.Builder> options) {
    return HttpClient.create(options.andThen(this::enableCompressionSupport));
  }

  private void enableCompressionSupport(Object builder) {
    ((HttpClientOptions.Builder) builder).compression(true);
  }
}
Benjamin Ihrig
@ihrigb
Oct 08 2018 13:44
Quick question to load-balanced RestTemplates: If I create a RestTemplate through RestTemplateBuilder, that is not exposed as a bean, it will not be load-balanced. Why was a separate interface for RestTemplateCustomizer chosen only for the load-balancing part? If it was the same interface, RestTemplates built through the builder would be load-balanced by default.
ulmermark
@ulmermark
Oct 08 2018 17:43

Hopefully someone has already come across this same issue and may provide a solution

https://stackoverflow.com/questions/35774931/nohttpresponseexception-server-failed-to-respond-with-zuul-proxy-and-authser?noredirect=1&lq=1

Hopefully looking for an @Bean and/or properties that could be set to the application.yml for a ZUUL API Gateway application

springBootVersion = '1.5.10.RELEASE' springCloudVersion = 'Edgware.SR3'