#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

@@ -17,6 +17,7 @@ package org.springframework.hateoas;
import java.util.Arrays;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.springframework.util.Assert;
@@ -29,8 +30,6 @@ import org.springframework.util.Assert;
@XmlRootElement
public class Resource<T> extends ResourceSupport {
@org.codehaus.jackson.annotate.JsonUnwrapped
@com.fasterxml.jackson.annotation.JsonUnwrapped
private final T content;
/**
@@ -68,6 +67,9 @@ public class Resource<T> extends ResourceSupport {
*
* @return the content
*/
@org.codehaus.jackson.annotate.JsonUnwrapped
@com.fasterxml.jackson.annotation.JsonUnwrapped
@XmlAnyElement
public T getContent() {
return content;
}