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

9th
Jun 2018
Marcos Barbero
@marcosbarbero
Jun 09 2018 08:59
@ofabricio how do you do that? I mean, that Redis enable/disable route. AFAIK it's not supported by zuul either.
Fabricio
@ofabricio
Jun 09 2018 11:00
@marcosbarbero I made a base filter, and all other filters inherit from it, and in the base shouldFilter I check redis :sweat_smile:
Marcos Barbero
@marcosbarbero
Jun 09 2018 11:17
well well well :smile: so it's not really a zuul thing, right? it's your own implementation
Fabricio
@ofabricio
Jun 09 2018 15:01
but is it possible to disable a route with spring gateway via code?
Fabricio
@ofabricio
Jun 09 2018 15:56
how do you handle gzipped responses with modifyResponseBody in spring gateway? I get this exception:
r.filters(f -> f.modifyResponseBody(Oi.class, Oi.class, (exchange, body) -> {
     System.out.println(body);
    return body;
})

Caused by: com.fasterxml.jackson.core.JsonParseException:
    Unexpected character ('¡' (code 161)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
readBody also doesn't work:
r.host("**")
.and()
.readBody(Oi.class, oi -> {
    System.out.println(oi);
    return true;
})

java.lang.NullPointerException: value
KaijuDeluxe
@KaijuDeluxe
Jun 09 2018 22:09
how much xmx should i give a service? (independent what it is doing)