-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Closed
Labels
type: regressionA regression from a previous releaseA regression from a previous release
Milestone
Description
After #37905 fix, child context created with SpringApplicationBuilder runs parents runners.
Child context creation code:
SpringApplication springApplication = new SpringApplicationBuilder(childMainClass)
.parent((ConfigurableApplicationContext) applicationContext)
.bannerMode(Banner.Mode.OFF)
.build();
ConfigurableApplicationContext context = springApplication.run();Code above is executed from parents CommandLineRunner and leads to infinite context recursion. Parents runner creates child context, which invokes parents runner and so on.
Looks like problem is in using context.getBeanProvider(Runner.class) instead of context.getBeansOfType(ApplicationRunner.class) in SpringApplication::callRunners
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: regressionA regression from a previous releaseA regression from a previous release