#124 - Fixed mapping annotations in ResourceSupport types.
Added @XmlAnyElement to Resource and moved annotations to accessors to avoid name clashes when overriding them using Jackson mixins.
This commit is contained in:
@@ -35,10 +35,6 @@ import org.springframework.util.Assert;
|
||||
@XmlRootElement(name = "entities")
|
||||
public class Resources<T> extends ResourceSupport implements Iterable<T> {
|
||||
|
||||
@XmlAnyElement
|
||||
@XmlElementWrapper
|
||||
@org.codehaus.jackson.annotate.JsonProperty("content")
|
||||
@com.fasterxml.jackson.annotation.JsonProperty("content")
|
||||
private final Collection<T> content;
|
||||
|
||||
/**
|
||||
@@ -100,6 +96,10 @@ public class Resources<T> extends ResourceSupport implements Iterable<T> {
|
||||
*
|
||||
* @return the content will never be {@literal null}.
|
||||
*/
|
||||
@XmlAnyElement
|
||||
@XmlElementWrapper
|
||||
@org.codehaus.jackson.annotate.JsonProperty("content")
|
||||
@com.fasterxml.jackson.annotation.JsonProperty("content")
|
||||
public Collection<T> getContent() {
|
||||
return Collections.unmodifiableCollection(content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user