diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java index 8cd7974e4a..46d02886c2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java @@ -36,7 +36,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; @@ -72,9 +71,6 @@ import com.fasterxml.jackson.datatype.joda.ser.DateTimeSerializer; @ConditionalOnClass(ObjectMapper.class) public class JacksonAutoConfiguration { - @Autowired - private ListableBeanFactory beanFactory; - @Configuration @ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class }) static class JacksonObjectMapperConfiguration { @@ -136,9 +132,9 @@ public class JacksonAutoConfiguration { @Configuration @ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class }) @EnableConfigurationProperties(JacksonProperties.class) - static class JacksonObjectMapperBuilderConfiguration implements - ApplicationContextAware { + static class JacksonObjectMapperBuilderConfiguration { + @Autowired private ApplicationContext applicationContext; @Autowired @@ -253,10 +249,6 @@ public class JacksonAutoConfiguration { .values(); } - @Override - public void setApplicationContext(ApplicationContext applicationContext) { - this.applicationContext = applicationContext; - } } }