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

Apr 2018
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 ,


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

Ryan Baxter
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
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
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()

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

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
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: