Adapt to removed deprecations in Spring HATEOAS 1.4.

Fixes #2072.
This commit is contained in:
Oliver Drotbohm
2021-10-08 11:02:55 +02:00
parent 388a04358c
commit 94dec6bfef
2 changed files with 3 additions and 3 deletions

View File

@@ -200,7 +200,7 @@ public class PersistentEntitySerializationTests {
withLink(Link.of("/orders/1")).//
build();
PagedModel<PersistentEntityResource> persistentEntityResource = new PagedModel<PersistentEntityResource>(
PagedModel<PersistentEntityResource> persistentEntityResource = PagedModel.of(
Arrays.asList(orderResource), new PageMetadata(1, 0, 10));
String result = mapper.writeValueAsString(persistentEntityResource);
@@ -256,7 +256,7 @@ public class PersistentEntitySerializationTests {
ProjectionFactory factory = new SpelAwareProxyProjectionFactory();
PersonSummary projection = factory.createProjection(PersonSummary.class, person);
String result = mapper.writeValueAsString(new EntityModel<PersonSummary>(projection));
String result = mapper.writeValueAsString(EntityModel.of(projection));
assertThat(JsonPath.<Object> read(result, "$._links.self")).isNotNull();
}

View File

@@ -107,7 +107,7 @@ public class PersistentEntitySerializationTests {
withLink(Link.of("/users/1")).//
build();
PagedModel<PersistentEntityResource> persistentEntityResource = new PagedModel<PersistentEntityResource>(
PagedModel<PersistentEntityResource> persistentEntityResource = PagedModel.of(
Arrays.asList(userResource), new PageMetadata(1, 0, 10));
String result = mapper.writeValueAsString(persistentEntityResource);