Open aheusingfeld opened 10 years ago
The storesByLocationLink which is defined by the spring-data-rest interface StoreRepository doesn't have any template variables. The JSON of the "rest-microservice-store" looks like this:
storesByLocationLink
StoreRepository
$ curl http://localhost:8081/stores/search { "_links" : { "by-location" : { "href" : "http://localhost:8081/stores/search/findByAddressLocationNear{?location,distance,page,size,sort}", "templated" : true } } }
As this seems fine to me but the customer JSON looks like this ...
{ "_embedded": { "customers": [ { ... }, "_links": { "self": { "href": "http://localhost:8080/customers/1" }, "stores-nearby": { "href": "http://localhost:8081/stores/search/findByAddressLocationNear" } } } ] } }
... I assume the variables get lost inside the Traverson.
Actually the cause seems to be that .asLink() only receives the URI without the variables.
.asLink()
The
storesByLocationLink
which is defined by the spring-data-rest interfaceStoreRepository
doesn't have any template variables. The JSON of the "rest-microservice-store" looks like this:As this seems fine to me but the customer JSON looks like this ...
... I assume the variables get lost inside the Traverson.