DATAREST-1341 - Move off of Java8PluginRegistry in favor of Spring Plugin's update one.

This commit is contained in:
Oliver Drotbohm
2019-02-07 20:33:44 +01:00
parent af6f55a92c
commit 93b8e68bbf
10 changed files with 29 additions and 64 deletions

View File

@@ -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));