Skip to content
Advertisement

Tag: spring-cloud

@Order in AbstractNameValueGatewayFilterFactory doesn’t work

I have 2 classes: filter and class to get response body. As far as I know I need to specify order NettyWriteResponseFilter.WRITE_RESPONSE_FILTER_ORDER-1 so filter will get response body. But when I implement Ordered or use annotation @Order or via OrderedGatewayFilter I cann’t call BodyRewrite class(which gets response body). When I try to use this for global filter(implemented GlobalFilter) it works

How to mock the discoveryClient?

I’m working with Eureka and I have a Method that uses the DiscoveryClient to obtain the instances of a service and the call this service and retrieve some information like this: It works, but now I want to make a JUnit test for the method and as I’m not going to have the Eureka working in the JUnit test environment,

Route order in Spring Cloud Gateway

We are implementing routes programmatically using a implementation of RouteDefinitionLocator. We have two services which should register at the same route path, where one of them is meant as a fallback if the other one does not exist. The preferred route with the specific path is: And the more general one, which should only fire if other route was found:

Spring Cloud Gateway for composite API calls?

I am starting to build a Microservice API Gateway, and I am considering Spring Cloud to help me with the routing. But some calls to the Gateway API will need multiple requests to different services. Lets say I have 2 services: Order Details Service and Delivery Service. I want to have a Gateway endpoint GET /orders/{orderId} that makes a call

Could not transfer artifacts from/to central maven repo when using Spring Framework Cloud

I am trying to create a maven project using Spring Framework Cloud. I defined pom.xml file as below When trying to build maven getting error for all dependencies as Could not transfer artifacts from/to central (https://repo.maven.apache.org/maven2) Multiple annotations found at this line: – Failure to transfer org.springframework:spring-orm:jar:4.2.6.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted

Advertisement