Switch to a different HalInstantiator constructor for Boot 2.5 compatibility. Fixes gh-536.

This commit is contained in:
Olga MaciaszekSharma
2021-04-27 16:22:03 +02:00
parent 1a00bbf705
commit fbcebb372c

View File

@@ -23,6 +23,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
@@ -73,7 +74,7 @@ public class FeignHalAutoConfiguration {
Jackson2HalModule.HalHandlerInstantiator halHandlerInstantiator = new Jackson2HalModule.HalHandlerInstantiator(
linkRelationProvider.getIfAvailable(), curieProviderInstance, messageResolver.getIfAvailable(),
configuration);
configuration, new DefaultListableBeanFactory());
mapper.setHandlerInstantiator(halHandlerInstantiator);