#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:
Oliver Gierke
2013-12-16 15:12:38 +01:00
parent 27069b82d6
commit fac6bbb2cc
5 changed files with 51 additions and 15 deletions

View File

@@ -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);
}