#695 - Remove Jaxb annotations.

By removing all Jaxb annotations, requesting data from a hypermedia-enabled endpoint inside a browser (which defaults to accept:application/xhtml+xml,*/*), Spring HATEOAS will yield HAL.
This commit is contained in:
Greg Turnquist
2018-02-01 16:39:48 -06:00
parent eff893fcf8
commit dca65e15f8
13 changed files with 234 additions and 194 deletions

View File

@@ -20,9 +20,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Optional;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.springframework.util.Assert;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -33,10 +30,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
*
* @author Oliver Gierke
*/
@XmlRootElement(name = "pagedEntities")
public class PagedResources<T> extends Resources<T> {
public static PagedResources<?> NO_PAGE = new PagedResources<Object>();
public static PagedResources<?> NO_PAGE = new PagedResources<>();
private PageMetadata metadata;
@@ -169,10 +165,10 @@ public class PagedResources<T> extends Resources<T> {
*/
public static class PageMetadata {
@XmlAttribute @JsonProperty private long size;
@XmlAttribute @JsonProperty private long totalElements;
@XmlAttribute @JsonProperty private long totalPages;
@XmlAttribute @JsonProperty private long number;
@JsonProperty private long size;
@JsonProperty private long totalElements;
@JsonProperty private long totalPages;
@JsonProperty private long number;
protected PageMetadata() {