Skip to content

Commit 32128a6

Browse files
committed
Polish
1 parent 7fc7e47 commit 32128a6

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
3737
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3838
import org.springframework.context.ApplicationContext;
39-
import org.springframework.context.ApplicationContextAware;
4039
import org.springframework.context.annotation.Bean;
4140
import org.springframework.context.annotation.Configuration;
4241
import org.springframework.context.annotation.Primary;
@@ -72,9 +71,6 @@
7271
@ConditionalOnClass(ObjectMapper.class)
7372
public class JacksonAutoConfiguration {
7473

75-
@Autowired
76-
private ListableBeanFactory beanFactory;
77-
7874
@Configuration
7975
@ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class })
8076
static class JacksonObjectMapperConfiguration {
@@ -136,9 +132,9 @@ private JacksonJodaDateFormat getJacksonJodaDateFormat() {
136132
@Configuration
137133
@ConditionalOnClass({ ObjectMapper.class, Jackson2ObjectMapperBuilder.class })
138134
@EnableConfigurationProperties(JacksonProperties.class)
139-
static class JacksonObjectMapperBuilderConfiguration implements
140-
ApplicationContextAware {
135+
static class JacksonObjectMapperBuilderConfiguration {
141136

137+
@Autowired
142138
private ApplicationContext applicationContext;
143139

144140
@Autowired
@@ -253,10 +249,6 @@ private static <T> Collection<T> getBeans(ListableBeanFactory beanFactory,
253249
.values();
254250
}
255251

256-
@Override
257-
public void setApplicationContext(ApplicationContext applicationContext) {
258-
this.applicationContext = applicationContext;
259-
}
260252
}
261253

262254
}

0 commit comments

Comments
 (0)