Embed object instead of collection in Spring HATEOAS
问题 A very quick question ,to which there seems to be no easy answer. Is it possible to put an object directly under the embedded resources using Spring HATEOAS? The desired output format in JSON should look like { ... _embedded: { myObject: { ... } } } Using the code below, I always end up with a colletion for any resource I want to embed. ArrayList<Resource<?>> embeddedContent = new ArrayList<>(); Resource<MyObject> myObjectResource = new Resource<MyObject>(new MyObject()); embeddedContent.add