From 5dc7536c2cff5716218335eadf6eb677f6eacfa8 Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Mon, 25 Jan 2021 22:58:34 +0100 Subject: [PATCH] Adapt to API changes in HalHandlerInstantiator. Fixes GH-1964. --- .../rest/webmvc/config/RepositoryRestMvcConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 4d819f6c9..350b765ae 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 @@ -120,7 +120,6 @@ import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter; @@ -577,7 +576,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon HalConfiguration halConfiguration = this.halConfiguration.getIfUnique(HalConfiguration::new); HalHandlerInstantiator instantiator = new HalHandlerInstantiator(defaultedRelProvider, curieProvider.getIfUnique(() -> new DefaultCurieProvider(Collections.emptyMap())), resolver.getObject(), - halConfiguration); + halConfiguration, applicationContext.getAutowireCapableBeanFactory()); ObjectMapper mapper = basicObjectMapper(); mapper.registerModule(persistentEntityJackson2Module(linkCollector));