Spring Cloud Gateway – getting 405 Method not allowed

Published

I have a problem where I am using Spring Cloud Gateway to reach my microservices. One of them is the user-service which has, among other things, an authentication endpoint. It is a POST endpoint, where the user simply sends his/her email and password.

For service discovery, I am using Eureka.

The problem I’m facing is that when I hit that endpoint through the gateway, for example the first request returns a 405 Method not Allowed, and further requests work just fine. What’s interesting is that the calls do reach the user-service (I can see in the logs how Hibernate queries my DB), but the gateway returns a 405 nonetheless. In the gateway I do have in the app.yml file for the predicates Method=GET,POST,PUT,DELETE, so this shouldn’t be an issue, I think.

Everything is also put in separate docker containers.

I am using java 16 with the latest versions for each dependency.

If you need me to provide any additional information, please ask me to do so.

Thanks a lot!

Source: Docker Questions

Published
Categorised as docker, gateway, java, netflix-eureka, spring Tagged , , , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq