This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
I am not sure why, but when I type in http://localhost:8080/schools, it is getting a response from the server that the local host is running, but I set up the RestController and set the value to "schools", it won't find anything.
It is almost identical to another program I made which it works fine, but for some reason, it will not find it on here, and I was wondering if there is an error in the class that might make this happen.
I have all the same dependencies that I had in another program that works, so I don't know what it is about this.
Rob Spoor wrote:Change the @RequestMapping on getAllSchools to @GetMapping. @RequestMapping by default has no method specified, so it won't listen to any request.
For some reason, that still didn't work.
I don't know if that's it, as I never used GetMapping on the other classes that are almost identical to this one, and those work fine. Something else is wrong as I tried a test class, and it still isn't working right.
It's returning an error saying it couldn't find a route, and does the same error if I type something that doesn't exist at all.