DATAREST-1341 - Adapt to package refactorings in Spring HATEOAS.

This commit is contained in:
Oliver Drotbohm
2019-02-27 12:59:45 +01:00
parent 85694576b2
commit 1bf08180db
69 changed files with 370 additions and 1043 deletions

View File

@@ -313,7 +313,7 @@ public class MongoWebTests extends CommonWebTests {
Link link = client.discoverUnique("users", "search", "findByColleaguesContains");
User thomas = userRepository.findAll(QUser.user.firstname.eq("Thomas")).iterator().next();
Link thomasUri = entityLinks.linkToSingleResource(User.class, thomas.id).expand();
Link thomasUri = entityLinks.linkToItemResource(User.class, thomas.id).expand();
String href = link.expand(thomasUri.getHref()).getHref();

View File

@@ -33,7 +33,7 @@ import org.springframework.data.rest.tests.mongodb.MongoDbRepositoryConfig;
import org.springframework.data.rest.tests.mongodb.User;
import org.springframework.data.rest.webmvc.mapping.Associations;
import org.springframework.data.rest.webmvc.support.Projector;
import org.springframework.hateoas.EntityLinks;
import org.springframework.hateoas.server.EntityLinks;
import org.springframework.hateoas.IanaLinkRelations;
import org.springframework.hateoas.Links;
import org.springframework.test.context.ContextConfiguration;
@@ -63,7 +63,7 @@ public class PersistentEntityResourceAssemblerIntegrationTests extends AbstractC
User user = new User();
user.id = BigInteger.valueOf(4711);
PersistentEntityResource resource = assembler.toResource(user);
PersistentEntityResource resource = assembler.toModel(user);
Links links = resource.getLinks();

View File

@@ -42,10 +42,10 @@ import org.springframework.data.rest.tests.mongodb.User.Nested;
import org.springframework.data.rest.tests.mongodb.UserRepository;
import org.springframework.data.rest.webmvc.PersistentEntityResource;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.LinkDiscoverer;
import org.springframework.hateoas.PagedResources;
import org.springframework.hateoas.PagedResources.PageMetadata;
import org.springframework.hateoas.hal.HalLinkDiscoverer;
import org.springframework.hateoas.client.LinkDiscoverer;
import org.springframework.hateoas.PagedModel;
import org.springframework.hateoas.PagedModel.PageMetadata;
import org.springframework.hateoas.mediatype.hal.HalLinkDiscoverer;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -109,7 +109,7 @@ public class PersistentEntitySerializationTests {
withLink(new Link("/users/1")).//
build();
PagedResources<PersistentEntityResource> persistentEntityResource = new PagedResources<PersistentEntityResource>(
PagedModel<PersistentEntityResource> persistentEntityResource = new PagedModel<PersistentEntityResource>(
Arrays.asList(userResource), new PageMetadata(1, 0, 10));
String result = mapper.writeValueAsString(persistentEntityResource);