Skip to content

Commit fc93e6b

Browse files
Adapt to changes in Spring Framework snapshots
See gh-32696
1 parent 95be931 commit fc93e6b

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.springframework.aot.hint.RuntimeHints;
4040
import org.springframework.aot.hint.RuntimeHintsRegistrar;
4141
import org.springframework.beans.BeansException;
42-
import org.springframework.beans.CachedIntrospectionResults;
4342
import org.springframework.beans.factory.config.BeanDefinition;
4443
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
4544
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -305,7 +304,6 @@ public ConfigurableApplicationContext run(String... args) {
305304
try {
306305
ApplicationArguments applicationArguments = new DefaultApplicationArguments(args);
307306
ConfigurableEnvironment environment = prepareEnvironment(listeners, bootstrapContext, applicationArguments);
308-
configureIgnoreBeanInfo(environment);
309307
Banner printedBanner = printBanner(environment);
310308
context = createApplicationContext();
311309
context.setApplicationStartup(this.applicationStartup);
@@ -532,14 +530,6 @@ protected void configurePropertySources(ConfigurableEnvironment environment, Str
532530
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) {
533531
}
534532

535-
private void configureIgnoreBeanInfo(ConfigurableEnvironment environment) {
536-
if (System.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME) == null) {
537-
Boolean ignore = environment.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME,
538-
Boolean.class, Boolean.TRUE);
539-
System.setProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME, ignore.toString());
540-
}
541-
}
542-
543533
/**
544534
* Bind the environment to the {@link SpringApplication}.
545535
* @param environment the environment to bind

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

-21
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import org.springframework.aot.AotDetector;
4545
import org.springframework.aot.hint.RuntimeHints;
4646
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
47-
import org.springframework.beans.CachedIntrospectionResults;
4847
import org.springframework.beans.factory.BeanCreationException;
4948
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
5049
import org.springframework.beans.factory.ObjectProvider;
@@ -194,7 +193,6 @@ void cleanUp() {
194193
this.context.close();
195194
}
196195
System.clearProperty("spring.main.banner-mode");
197-
System.clearProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
198196
SpringApplicationShutdownHookInstance.reset();
199197
}
200198

@@ -280,25 +278,6 @@ void enableBannerInLogViaProperty(CapturedOutput output) {
280278
assertThat(output).contains("o.s.b.SpringApplication");
281279
}
282280

283-
@Test
284-
void setIgnoreBeanInfoPropertyByDefault(CapturedOutput output) {
285-
SpringApplication application = new SpringApplication(ExampleConfig.class);
286-
application.setWebApplicationType(WebApplicationType.NONE);
287-
this.context = application.run();
288-
String property = System.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
289-
assertThat(property).isEqualTo("true");
290-
}
291-
292-
@Test
293-
void disableIgnoreBeanInfoProperty() {
294-
System.setProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME, "false");
295-
SpringApplication application = new SpringApplication(ExampleConfig.class);
296-
application.setWebApplicationType(WebApplicationType.NONE);
297-
this.context = application.run();
298-
String property = System.getProperty(CachedIntrospectionResults.IGNORE_BEANINFO_PROPERTY_NAME);
299-
assertThat(property).isEqualTo("false");
300-
}
301-
302281
@Test
303282
void triggersConfigFileApplicationListenerBeforeBinding() {
304283
SpringApplication application = new SpringApplication(ExampleConfig.class);

0 commit comments

Comments
 (0)