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

2nd
Apr 2018
dragontree101
@dragontree101
Apr 02 2018 07:35

i want to use spring-cloud-gateway
i hava myself RoutePredicateFactory and i want to all request into this RoutePredicateFactory, but i am not want to set this RoutePredicateFactory in all route, so i want to use default-filters like ,

spring:
  cloud:
    gateway:
      default-filters:

but only this config only set default-filters, can not set default-predicate, how should i config a global RoutePredicateFactory thanks

Ryan Baxter
@ryanjbaxter
Apr 02 2018 10:46
@dragontree101 you cannot logically or predicates together via yaml config, all predicates are logically anded together
if you want to have a filter that applies to all routes regardless you can look into implementing a GlobalFilter
Ryan Baxter
@ryanjbaxter
Apr 02 2018 11:47
sorry misunderstood your last question
i dont think there is a way to have default predicates currently
Anton Brok-Volchansky
@re6exp
Apr 02 2018 12:45

@dragontree101 @ryanjbaxter In tests there is SseIntegrationTests.

        public RouteLocator sseRouteLocator(RouteLocatorBuilder builder) {
            return builder.routes()
                    .route("sse_route", r -> r.alwaysTrue()
                            .uri("http://localhost:"+this.port))
                    .build();
        }

May be, this is the way how to accomplish default predicate?

dragontree101
@dragontree101
Apr 02 2018 12:48
@ryanjbaxter @re6exp thanks , i think i know should i do, in my programmer , i should use global filter.
Stav Alfi
@stavalfi
Apr 02 2018 14:31
Hi guys, I'm new with spring-cloud-config. Is there anychance that someone could help me out acheive a basic functionality:
https://stackoverflow.com/questions/49613123/could-not-resolve-placeholder-message-in-value-message