spring-cloud-gateway
spring-cloud-gateway copied to clipboard
How to delete or update RouteLocator
@Bean @Order public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { return builder.routes() .route(MXH_LV_ROUTER, r -> r .path(mxhlyProxyUri) .filters(f -> f.stripPrefix(3).modifyRequestBody(String.class, String.class, MediaType.APPLICATION_JSON_VALUE, (exchange, requestBody) -> { String modifiedBody = modifyRequestBody(requestBody); return Mono.just(modifiedBody); }) ) .uri(mxhlyProxyHost) ) .build(); } The above is how I added RouteLocator. Is there any way to delete or update it while the system is running?
I don't know which tool you want to use to change attributes. But I was thinking about one of the cases I solved earlier. Maybe this can help you.
Update the routes while the gateways are running with Apollo
Configuration based properties can be updated or using a RouteDefinitionRepository
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.