|
36 | 36 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
37 | 37 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
38 | 38 | import org.springframework.context.ApplicationContext;
|
39 |
| -import org.springframework.context.ApplicationContextAware; |
40 | 39 | import org.springframework.context.annotation.Bean;
|
41 | 40 | import org.springframework.context.annotation.Configuration;
|
42 | 41 | import org.springframework.context.annotation.Primary;
|
|
72 | 71 | @ConditionalOnClass(ObjectMapper.class)
|
73 | 72 | public class JacksonAutoConfiguration {
|
74 | 73 |
|
75 |
| - @Autowired |
76 |
| - private ListableBeanFactory beanFactory; |
77 |
| - |
78 | 74 | @Configuration
|
79 | 75 | @ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class })
|
80 | 76 | static class JacksonObjectMapperConfiguration {
|
@@ -136,9 +132,9 @@ private JacksonJodaDateFormat getJacksonJodaDateFormat() {
|
136 | 132 | @Configuration
|
137 | 133 | @ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class })
|
138 | 134 | @EnableConfigurationProperties(JacksonProperties.class)
|
139 |
| - static class JacksonObjectMapperBuilderConfiguration implements |
140 |
| - ApplicationContextAware { |
| 135 | + static class JacksonObjectMapperBuilderConfiguration { |
141 | 136 |
|
| 137 | + @Autowired |
142 | 138 | private ApplicationContext applicationContext;
|
143 | 139 |
|
144 | 140 | @Autowired
|
@@ -253,10 +249,6 @@ private static <T> Collection<T> getBeans(ListableBeanFactory beanFactory,
|
253 | 249 | .values();
|
254 | 250 | }
|
255 | 251 |
|
256 |
| - @Override |
257 |
| - public void setApplicationContext(ApplicationContext applicationContext) { |
258 |
| - this.applicationContext = applicationContext; |
259 |
| - } |
260 | 252 | }
|
261 | 253 |
|
262 | 254 | }
|
0 commit comments