I'm learning from a Youtube tutorial (https://youtu.be/9b6OOGMpx5Y) to implement a microservices system having about 5 microservices with an API Gateway. The API Gateway is using the Spring Cloud Gateway library which I named "api-gateway-service
". I'm new to Spring Cloud Gateway and I'm trying to figure out what it's saying here in the error log on application boot up as it seems to be having a problem with Token Relay but I don't know what exactly it is and where is it that it is causing this problem from:
I could set the property spring.main.allow-bean-definition-overriding=true
in application.properties
file so it would be able to boot up the application but Token Relay-ing wouldn't work.
Has anyone approached this error before and do you know a solution to fix it? Thanks!
TokenRelayGatewayFilterFactory is removed from the spring cloud security and moved to the Spring cloud gateway.
I have recently encoutered this issues. Here, see the documentation spring doc
But first of all make sure you have this dependency in your pom.xml file.
Instead of Autowiring the TokenRelayGatewayFilterFactory, you can do like this