Stephan van Hulst wrote:
You're also no using HATEOAS correctly.
I suspected that this might be the case

Let's start from scratch because I think I made a total mess of it.
I should probably start with the requirement: "The Pricing Service API is converted to a microservice with Spring Data REST, without the need to explicitly include code for the Controller or Service."
So I included spring-data-rest dependency that exposed the REST API.
Price class that client uses looks like this (accessor methods omitted):
So now, I'm able to hit
http://localhost:8082/prices/
Which gives me a list of prices:
I can also access any resource by id, no problem.
Now, I wanted to find all the prices with a particular vehicleId so I added that findByVehicleId method to the PriceRepository (I thought that that's the way I need to do it) and now
http://localhost:8082/prices gives me the following result:
http://localhost:8082/prices/search shows my query method:
I'm probably barking at the wrong tree, just trying to follow a course on Udacity but it's very confusing as the examples are very basic and the assignment is completely different.
Starter code has this client class (
link to github)
But I have no idea what to do to make it work with query parameters