This is achieved by three new annotations:
- @ConditionalOnEnabledFilter
- @ConditionalOnEnabledGlobalFilter
- @ConditionalOnEnabledPredicate
properties are :
- spring.cloud.gateway.filter.<name>.enabled
- spring.cloud.gateway.global-filter.<name>.enabled
- spring.cloud.gateway.predicate.<name>.enabled
Where name is the snake case version of the class name minus the suffix.
So, `RemoveCachedBodyFilter` has `<name>` of `remove-cached-body` and
`PathRoutePredicateFactor has a `<name>` of `path.
Fixes gh-72
Previously, the RouteRefreshListener reset the routes cache on all ContextRefreshedEvents. If actuator is run on a seperate port, to ContextRefreshedEvents are published. This adds a check to only reset the cache if the event does not come from the management context.
Fixes gh-1928
spring-cloud-starter-gateway now depends on spring-cloud-gateway-server.
spring-cloud-gateway-core now depends on spring-cloud-gateway-server and prints a deprecation message if users are depending on spring-cloud-gateway-core directly.