Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to test http://localhost:8000/currency-exchange/from/EUR/to/INR #4

Open
ashokvn opened this issue Oct 21, 2018 · 1 comment

Comments

@ashokvn
Copy link

ashokvn commented Oct 21, 2018

I created the forex microservice exactly as given in http://www.springboottutorial.com/creating-microservices-with-spring-boot-part-2-forex-microservice. I ran the appplication and tried to test the url http://localhost:8000/currency-exchange/from/EUR/to/INR, but getting the whilte lable error page. From postman I got the below response
{
"timestamp": "2018-10-21T16:08:58.060+0000",
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/currency-exchange/from/EUR/to/INR"
}
What could be the issue?

@crassy
Copy link

crassy commented Nov 27, 2021

Since, this problem didn't answer, I am providing the solution now.

If the "@SpringBootApplication" class contains in com.xyz.bootapplication package, then the controller should be located at com.xyz.bootapplication.controller package.

If the controller which is having "@RestController" annotation is located at any other location ex: com.xyz.controller then the problem will be happen.

So please place the "@SpringBootApplication" class at the top of the class hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants