diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/DefaultSelfLinkProvider.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/DefaultSelfLinkProvider.java index 01ca46b2e..bc449e4ae 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/DefaultSelfLinkProvider.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/DefaultSelfLinkProvider.java @@ -18,9 +18,9 @@ package org.springframework.data.rest.core.support; import java.util.List; import org.springframework.data.mapping.context.PersistentEntities; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.hateoas.EntityLinks; import org.springframework.hateoas.Link; +import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.Assert; /** @@ -35,7 +35,7 @@ public class DefaultSelfLinkProvider implements SelfLinkProvider { private final PersistentEntities entities; private final EntityLinks entityLinks; - private final Java8PluginRegistry, Class> lookups; + private final PluginRegistry, Class> lookups; /** * Creates a new {@link DefaultSelfLinkProvider} from the {@link PersistentEntities}, {@link EntityLinks} and @@ -54,7 +54,7 @@ public class DefaultSelfLinkProvider implements SelfLinkProvider { this.entities = entities; this.entityLinks = entityLinks; - this.lookups = Java8PluginRegistry.of(lookups); + this.lookups = PluginRegistry.of(lookups); } /* diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/UnwrappingRepositoryInvokerFactory.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/UnwrappingRepositoryInvokerFactory.java index 4bd86ddb7..fb42c2459 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/UnwrappingRepositoryInvokerFactory.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/UnwrappingRepositoryInvokerFactory.java @@ -28,7 +28,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.repository.support.RepositoryInvoker; import org.springframework.data.repository.support.RepositoryInvokerFactory; -import org.springframework.data.rest.core.util.Java8PluginRegistry; +import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.Assert; import org.springframework.util.MultiValueMap; @@ -41,7 +41,7 @@ import org.springframework.util.MultiValueMap; public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFactory { private final RepositoryInvokerFactory delegate; - private final Java8PluginRegistry, Class> lookups; + private final PluginRegistry, Class> lookups; /** * @param delegate must not be {@literal null}. @@ -54,7 +54,7 @@ public class UnwrappingRepositoryInvokerFactory implements RepositoryInvokerFact Assert.notNull(lookups, "EntityLookups must not be null!"); this.delegate = delegate; - this.lookups = Java8PluginRegistry.of(lookups); + this.lookups = PluginRegistry.of(lookups); } /* diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util/Java8PluginRegistry.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util/Java8PluginRegistry.java index 0b134bfa8..050f2d2b5 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util/Java8PluginRegistry.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util/Java8PluginRegistry.java @@ -21,20 +21,21 @@ import java.util.Collections; import java.util.List; import java.util.Optional; -import org.springframework.plugin.core.OrderAwarePluginRegistry; import org.springframework.plugin.core.Plugin; import org.springframework.plugin.core.PluginRegistry; /** * @author Oliver Gierke + * @deprecated since 3.2, for removal 3.3. */ +@Deprecated @RequiredArgsConstructor public class Java8PluginRegistry, S> { private final PluginRegistry registry; public static , S> Java8PluginRegistry of(List plugins) { - return Java8PluginRegistry.of(OrderAwarePluginRegistry.create(plugins)); + return Java8PluginRegistry.of(PluginRegistry.of(plugins)); } public static , S> Java8PluginRegistry of(PluginRegistry plugins) { diff --git a/spring-data-rest-tests/spring-data-rest-tests-core/src/test/java/org/springframework/data/rest/tests/RepositoryTestsConfig.java b/spring-data-rest-tests/spring-data-rest-tests-core/src/test/java/org/springframework/data/rest/tests/RepositoryTestsConfig.java index 1c6258f55..98e6c3f69 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-core/src/test/java/org/springframework/data/rest/tests/RepositoryTestsConfig.java +++ b/spring-data-rest-tests/spring-data-rest-tests-core/src/test/java/org/springframework/data/rest/tests/RepositoryTestsConfig.java @@ -17,7 +17,6 @@ package org.springframework.data.rest.tests; import static org.mockito.Mockito.*; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -39,7 +38,6 @@ import org.springframework.data.rest.core.mapping.RepositoryResourceMappings; import org.springframework.data.rest.core.support.DefaultSelfLinkProvider; import org.springframework.data.rest.core.support.EntityLookup; import org.springframework.data.rest.core.support.SelfLinkProvider; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler; import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module; import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.LookupObjectSerializer; @@ -57,6 +55,7 @@ import org.springframework.hateoas.ResourceProcessor; import org.springframework.hateoas.core.EvoInflectorRelProvider; import org.springframework.hateoas.hal.Jackson2HalModule; import org.springframework.hateoas.mvc.ResourceProcessorInvoker; +import org.springframework.plugin.core.PluginRegistry; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -109,8 +108,7 @@ public class RepositoryTestsConfig { RepositoryResourceMappings mappings = new RepositoryResourceMappings(repositories(), persistentEntities(), config()); EntityLinks entityLinks = new RepositoryEntityLinks(repositories(), mappings, config(), - mock(PagingAndSortingTemplateVariables.class), - Java8PluginRegistry.of(Arrays.asList(DefaultIdConverter.INSTANCE))); + mock(PagingAndSortingTemplateVariables.class), PluginRegistry.of(DefaultIdConverter.INSTANCE)); SelfLinkProvider selfLinkProvider = new DefaultSelfLinkProvider(persistentEntities(), entityLinks, Collections.> emptyList()); diff --git a/spring-data-rest-tests/spring-data-rest-tests-jpa/src/test/java/org/springframework/data/rest/webmvc/json/RepositoryTestsConfig.java b/spring-data-rest-tests/spring-data-rest-tests-jpa/src/test/java/org/springframework/data/rest/webmvc/json/RepositoryTestsConfig.java index 719a0f1d1..5c13354d7 100644 --- a/spring-data-rest-tests/spring-data-rest-tests-jpa/src/test/java/org/springframework/data/rest/webmvc/json/RepositoryTestsConfig.java +++ b/spring-data-rest-tests/spring-data-rest-tests-jpa/src/test/java/org/springframework/data/rest/webmvc/json/RepositoryTestsConfig.java @@ -17,7 +17,6 @@ package org.springframework.data.rest.webmvc.json; import static org.mockito.Mockito.*; -import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -39,7 +38,6 @@ import org.springframework.data.rest.core.mapping.RepositoryResourceMappings; import org.springframework.data.rest.core.support.DefaultSelfLinkProvider; import org.springframework.data.rest.core.support.EntityLookup; import org.springframework.data.rest.core.support.SelfLinkProvider; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler; import org.springframework.data.rest.webmvc.jpa.Person; import org.springframework.data.rest.webmvc.jpa.PersonRepository; @@ -58,6 +56,7 @@ import org.springframework.hateoas.ResourceProcessor; import org.springframework.hateoas.core.EvoInflectorRelProvider; import org.springframework.hateoas.hal.Jackson2HalModule; import org.springframework.hateoas.mvc.ResourceProcessorInvoker; +import org.springframework.plugin.core.PluginRegistry; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -117,8 +116,7 @@ public class RepositoryTestsConfig { RepositoryResourceMappings mappings = new RepositoryResourceMappings(repositories(), persistentEntities(), config()); EntityLinks entityLinks = new RepositoryEntityLinks(repositories(), mappings, config(), - mock(PagingAndSortingTemplateVariables.class), - Java8PluginRegistry.of(Arrays.asList(DefaultIdConverter.INSTANCE))); + mock(PagingAndSortingTemplateVariables.class), PluginRegistry.of(DefaultIdConverter.INSTANCE)); SelfLinkProvider selfLinkProvider = new DefaultSelfLinkProvider(persistentEntities(), entityLinks, Collections.> emptyList()); diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java index e9555379f..64c730a8e 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java @@ -75,48 +75,18 @@ import org.springframework.data.rest.core.support.EntityLookup; import org.springframework.data.rest.core.support.RepositoryRelProvider; import org.springframework.data.rest.core.support.SelfLinkProvider; import org.springframework.data.rest.core.support.UnwrappingRepositoryInvokerFactory; -import org.springframework.data.rest.core.util.Java8PluginRegistry; -import org.springframework.data.rest.webmvc.BasePathAwareController; -import org.springframework.data.rest.webmvc.BasePathAwareHandlerMapping; -import org.springframework.data.rest.webmvc.BaseUri; -import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler; -import org.springframework.data.rest.webmvc.HttpHeadersPreparer; -import org.springframework.data.rest.webmvc.ProfileResourceProcessor; -import org.springframework.data.rest.webmvc.RepositoryRestController; -import org.springframework.data.rest.webmvc.RepositoryRestExceptionHandler; -import org.springframework.data.rest.webmvc.RepositoryRestHandlerAdapter; -import org.springframework.data.rest.webmvc.RepositoryRestHandlerMapping; -import org.springframework.data.rest.webmvc.RestMediaTypes; -import org.springframework.data.rest.webmvc.ServerHttpRequestMethodArgumentResolver; +import org.springframework.data.rest.webmvc.*; import org.springframework.data.rest.webmvc.alps.AlpsJsonHttpMessageConverter; import org.springframework.data.rest.webmvc.alps.RootResourceInformationToAlpsDescriptorConverter; import org.springframework.data.rest.webmvc.convert.UriListHttpMessageConverter; -import org.springframework.data.rest.webmvc.json.DomainObjectReader; -import org.springframework.data.rest.webmvc.json.EnumTranslator; -import org.springframework.data.rest.webmvc.json.Jackson2DatatypeHelper; -import org.springframework.data.rest.webmvc.json.JacksonMappingAwareSortTranslator; -import org.springframework.data.rest.webmvc.json.JacksonSerializers; -import org.springframework.data.rest.webmvc.json.MappingAwareDefaultedPageableArgumentResolver; -import org.springframework.data.rest.webmvc.json.MappingAwarePageableArgumentResolver; -import org.springframework.data.rest.webmvc.json.MappingAwareSortArgumentResolver; -import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module; +import org.springframework.data.rest.webmvc.json.*; import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.LookupObjectSerializer; -import org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter; import org.springframework.data.rest.webmvc.json.PersistentEntityToJsonSchemaConverter.ValueTypeSchemaPropertyCustomizerFactory; import org.springframework.data.rest.webmvc.mapping.Associations; import org.springframework.data.rest.webmvc.mapping.LinkCollector; import org.springframework.data.rest.webmvc.spi.BackendIdConverter; import org.springframework.data.rest.webmvc.spi.BackendIdConverter.DefaultIdConverter; -import org.springframework.data.rest.webmvc.support.BackendIdHandlerMethodArgumentResolver; -import org.springframework.data.rest.webmvc.support.DefaultExcerptProjector; -import org.springframework.data.rest.webmvc.support.DelegatingHandlerMapping; -import org.springframework.data.rest.webmvc.support.DomainClassResolver; -import org.springframework.data.rest.webmvc.support.ETagArgumentResolver; -import org.springframework.data.rest.webmvc.support.ExcerptProjector; -import org.springframework.data.rest.webmvc.support.HttpMethodHandlerMethodArgumentResolver; -import org.springframework.data.rest.webmvc.support.JpaHelper; -import org.springframework.data.rest.webmvc.support.PagingAndSortingTemplateVariables; -import org.springframework.data.rest.webmvc.support.RepositoryEntityLinks; +import org.springframework.data.rest.webmvc.support.*; import org.springframework.data.util.AnnotatedTypeScanner; import org.springframework.data.util.Lazy; import org.springframework.data.web.HateoasPageableHandlerMethodArgumentResolver; @@ -142,7 +112,6 @@ import org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessage import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.plugin.core.OrderAwarePluginRegistry; import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.ClassUtils; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; @@ -386,7 +355,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon @Bean public BackendIdHandlerMethodArgumentResolver backendIdHandlerMethodArgumentResolver() { - return new BackendIdHandlerMethodArgumentResolver(Java8PluginRegistry.of(backendIdConverterRegistry()), + return new BackendIdHandlerMethodArgumentResolver(backendIdConverterRegistry(), resourceMetadataHandlerMethodArgumentResolver(), baseUri()); } @@ -409,7 +378,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon pageableResolver(), sortResolver()); return new RepositoryEntityLinks(repositories(), resourceMappings(), repositoryRestConfiguration(), - templateVariables, Java8PluginRegistry.of(backendIdConverterRegistry())); + templateVariables, backendIdConverterRegistry()); } /** @@ -648,8 +617,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon EmbeddedResourcesAssembler assembler = new EmbeddedResourcesAssembler(entities, associationLinks(), excerptProjector()); - LookupObjectSerializer lookupObjectSerializer = new LookupObjectSerializer( - Java8PluginRegistry.of(getEntityLookups())); + LookupObjectSerializer lookupObjectSerializer = new LookupObjectSerializer(PluginRegistry.of(getEntityLookups())); return new PersistentEntityJackson2Module(associationLinks(), entities, uriToEntityConverter, linkCollector(), repositoryInvokerFactory, lookupObjectSerializer, resourceProcessorInvoker(), assembler); @@ -774,7 +742,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon converters.addAll(this.idConverters); converters.add(DefaultIdConverter.INSTANCE); - return OrderAwarePluginRegistry.create(converters); + return PluginRegistry.of(converters); } @Bean diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java index 752a58ac4..bd5c4bf8e 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2Module.java @@ -45,7 +45,6 @@ import org.springframework.data.rest.core.mapping.ResourceMappings; import org.springframework.data.rest.core.mapping.ResourceMetadata; import org.springframework.data.rest.core.support.EntityLookup; import org.springframework.data.rest.core.support.SelfLinkProvider; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler; import org.springframework.data.rest.webmvc.PersistentEntityResource; import org.springframework.data.rest.webmvc.mapping.Associations; @@ -56,6 +55,7 @@ import org.springframework.hateoas.Links; import org.springframework.hateoas.Resource; import org.springframework.hateoas.UriTemplate; import org.springframework.hateoas.mvc.ResourceProcessorInvoker; +import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.Assert; import org.springframework.util.StringUtils; @@ -774,7 +774,7 @@ public class PersistentEntityJackson2Module extends SimpleModule { public static class LookupObjectSerializer extends ToStringSerializer { private static final long serialVersionUID = -3033458643050330913L; - private final Java8PluginRegistry, Class> lookups; + private final PluginRegistry, Class> lookups; /* * (non-Javadoc) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/BackendIdHandlerMethodArgumentResolver.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/BackendIdHandlerMethodArgumentResolver.java index 90d485ba8..6f06b4cbf 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/BackendIdHandlerMethodArgumentResolver.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/BackendIdHandlerMethodArgumentResolver.java @@ -19,12 +19,12 @@ import java.io.Serializable; import org.springframework.core.MethodParameter; import org.springframework.data.rest.core.mapping.ResourceMetadata; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.BaseUri; import org.springframework.data.rest.webmvc.config.ResourceMetadataHandlerMethodArgumentResolver; import org.springframework.data.rest.webmvc.spi.BackendIdConverter; import org.springframework.data.rest.webmvc.spi.BackendIdConverter.DefaultIdConverter; import org.springframework.data.rest.webmvc.util.UriUtils; +import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.Assert; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; @@ -39,7 +39,7 @@ import org.springframework.web.method.support.ModelAndViewContainer; */ public class BackendIdHandlerMethodArgumentResolver implements HandlerMethodArgumentResolver { - private final Java8PluginRegistry> idConverters; + private final PluginRegistry> idConverters; private final ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver; private final BaseUri baseUri; @@ -51,7 +51,7 @@ public class BackendIdHandlerMethodArgumentResolver implements HandlerMethodArgu * @param resourceMetadataResolver the resolver to obtain {@link ResourceMetadata} from, must not be {@literal null}. * @param baseUri must not be {@literal null}. */ - public BackendIdHandlerMethodArgumentResolver(Java8PluginRegistry> idConverters, + public BackendIdHandlerMethodArgumentResolver(PluginRegistry> idConverters, ResourceMetadataHandlerMethodArgumentResolver resourceMetadataResolver, BaseUri baseUri) { Assert.notNull(idConverters, "Id converters must not be null!"); diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java index 95b181f33..54afbb575 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java @@ -35,7 +35,6 @@ import org.springframework.data.rest.core.mapping.ResourceMapping; import org.springframework.data.rest.core.mapping.ResourceMappings; import org.springframework.data.rest.core.mapping.ResourceMetadata; import org.springframework.data.rest.core.mapping.SearchResourceMappings; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.BaseUri; import org.springframework.data.rest.webmvc.spi.BackendIdConverter; import org.springframework.data.rest.webmvc.spi.BackendIdConverter.DefaultIdConverter; @@ -48,6 +47,7 @@ import org.springframework.hateoas.TemplateVariable.VariableType; import org.springframework.hateoas.TemplateVariables; import org.springframework.hateoas.UriTemplate; import org.springframework.hateoas.core.AbstractEntityLinks; +import org.springframework.plugin.core.PluginRegistry; import org.springframework.util.Assert; import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; @@ -66,7 +66,7 @@ public class RepositoryEntityLinks extends AbstractEntityLinks { private final @NonNull ResourceMappings mappings; private final @NonNull RepositoryRestConfiguration config; private final @NonNull PagingAndSortingTemplateVariables templateVariables; - private final @NonNull Java8PluginRegistry> idConverters; + private final @NonNull PluginRegistry> idConverters; /* * (non-Javadoc) diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2ModuleUnitTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2ModuleUnitTests.java index e448e6d38..c1c4e4d25 100755 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2ModuleUnitTests.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/PersistentEntityJackson2ModuleUnitTests.java @@ -42,7 +42,6 @@ import org.springframework.data.rest.core.UriToEntityConverter; import org.springframework.data.rest.core.mapping.ResourceMappings; import org.springframework.data.rest.core.support.EntityLookup; import org.springframework.data.rest.core.support.SelfLinkProvider; -import org.springframework.data.rest.core.util.Java8PluginRegistry; import org.springframework.data.rest.webmvc.EmbeddedResourcesAssembler; import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.AssociationOmittingSerializerModifier; import org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module.AssociationUriResolvingDeserializerModifier; @@ -54,6 +53,7 @@ import org.springframework.hateoas.EntityLinks; import org.springframework.hateoas.ResourceProcessor; import org.springframework.hateoas.UriTemplate; import org.springframework.hateoas.mvc.ResourceProcessorInvoker; +import org.springframework.plugin.core.PluginRegistry; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -99,7 +99,7 @@ public class PersistentEntityJackson2ModuleUnitTests { SimpleModule module = new SimpleModule(); module.setSerializerModifier(new AssociationOmittingSerializerModifier(persistentEntities, associations, - nestedEntitySerializer, new LookupObjectSerializer(Java8PluginRegistry.of(Arrays.asList(new HomeLookup()))))); + nestedEntitySerializer, new LookupObjectSerializer(PluginRegistry.of(new HomeLookup())))); module.setDeserializerModifier( new AssociationUriResolvingDeserializerModifier(persistentEntities, associations, converter, factory));