#482 - Add support for Collection+JSON mediatype.
Introduce support for media type application/vnd.collection+json. Collection+JSON doesn't allow metadata at the top, so paging data can't be covered, however, everything else fits. Also moved a little bit more into Affordance and SpringMvcAffordance to avoid using Spring MVC annotations directly in a given mediatype's AffordanceModel. Refactored bits of HAL-FORMS to reuse the new PropertyUtils, ensuring Jackson ignore annotations are taken into consideration. Also added MockMVC tests to show HAL-FORMS and Collection+JSON working together, against the same controller.
This commit is contained in:
committed by
Oliver Gierke
parent
3af698d928
commit
d6e02857f1
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonUnwrapped;
|
||||
* A simple {@link Resource} wrapping a domain object and adding links to it.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Greg Turnquist
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class Resource<T> extends ResourceSupport {
|
||||
@@ -38,7 +39,7 @@ public class Resource<T> extends ResourceSupport {
|
||||
/**
|
||||
* Creates an empty {@link Resource}.
|
||||
*/
|
||||
Resource() {
|
||||
protected Resource() {
|
||||
this.content = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user