Restructure bootstrap classes to a foundational layer
Move bootstrap code from `org.springframework.boot` to `org.springframework.boot.bootstrap` and make them a foundational layer. This move helps reduce `org.springframework.boot.context.config` dependencies to `org.springframework.boot`. See gh-47232
This commit is contained in:
parent
b02371f763
commit
4ebf09ad12
|
@ -13,7 +13,10 @@
|
|||
<!-- Allow other imports -->
|
||||
<allow pkg=".*" regex="true" />
|
||||
|
||||
<!-- Keep foundation packages away from SpringApplication package -->
|
||||
<!-- Keep foundation packages away from 'org.springframework.boot' package -->
|
||||
<subpackage name="bootstrap">
|
||||
<disallow pkg="org.springframework.boot" exact-match="true"/>
|
||||
</subpackage>
|
||||
<subpackage name="ssl">
|
||||
<disallow pkg="org.springframework.boot" exact-match="true"/>
|
||||
</subpackage>
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package org.springframework.boot.test.context;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.DefaultPropertiesPropertySource;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigData;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor;
|
||||
import org.springframework.boot.env.RandomValuePropertySource;
|
||||
|
|
|
@ -30,13 +30,13 @@ import org.springframework.aot.hint.RuntimeHints;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.boot.ApplicationContextFactory;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.SpringApplication.AbandonedRunException;
|
||||
import org.springframework.boot.SpringApplicationHook;
|
||||
import org.springframework.boot.SpringApplicationRunListener;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.test.context.SpringBootTest.UseMainMethod;
|
||||
import org.springframework.boot.test.mock.web.SpringBootMockServletContext;
|
||||
|
|
|
@ -58,6 +58,9 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
|||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistryInitializer;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.properties.bind.Bindable;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.time.Duration;
|
|||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.function.Consumer;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.metrics.ApplicationStartup;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
@ -31,7 +31,7 @@ import org.springframework.core.env.Environment;
|
|||
* shared before the {@link ApplicationContext} is available.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface BootstrapContext {
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
@ -23,7 +23,7 @@ import org.springframework.context.ConfigurableApplicationContext;
|
|||
* {@link ApplicationEvent} published by a {@link BootstrapContext} when it's closed.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
* @see BootstrapRegistry#addCloseListener(org.springframework.context.ApplicationListener)
|
||||
*/
|
||||
public class BootstrapContextClosedEvent extends ApplicationEvent {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
@ -42,7 +42,7 @@ import org.springframework.util.Assert;
|
|||
* use.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
* @see BootstrapContext
|
||||
* @see ConfigurableBootstrapContext
|
||||
*/
|
|
@ -14,15 +14,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
/**
|
||||
* Callback interface that can be used to initialize a {@link BootstrapRegistry} before it
|
||||
* is used.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.5
|
||||
* @see SpringApplication#addBootstrapRegistryInitializer(BootstrapRegistryInitializer)
|
||||
* @since 4.0.0
|
||||
* @see BootstrapRegistry
|
||||
*/
|
||||
@FunctionalInterface
|
|
@ -14,14 +14,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
/**
|
||||
* A {@link BootstrapContext} that also provides configuration methods through the
|
||||
* {@link BootstrapRegistry} interface.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
* @see BootstrapRegistry
|
||||
* @see BootstrapContext
|
||||
* @see DefaultBootstrapContext
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -33,7 +33,7 @@ import org.springframework.util.Assert;
|
|||
* Default {@link ConfigurableBootstrapContext} implementation.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 2.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class DefaultBootstrapContext implements ConfigurableBootstrapContext {
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright 2012-present the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Bootstrap concerns to support the creation of potentially expensive singletons while
|
||||
* the application starts.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
|
@ -33,10 +33,10 @@ import org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact
|
|||
import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
import org.springframework.boot.ApplicationContextFactory;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.BootstrapRegistryInitializer;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistryInitializer;
|
||||
import org.springframework.boot.convert.ApplicationConversionService;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextInitializer;
|
||||
|
|
|
@ -26,10 +26,10 @@ import java.util.Set;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.BootstrapRegistry.Scope;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.DefaultPropertiesPropertySource;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.Scope;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributors.BinderOption;
|
||||
import org.springframework.boot.context.properties.bind.BindException;
|
||||
import org.springframework.boot.context.properties.bind.Bindable;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.function.Predicate;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributor.ImportPhase;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributor.Kind;
|
||||
import org.springframework.boot.context.properties.bind.BindContext;
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.function.Supplier;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.env.EnvironmentPostProcessor;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
|
|
|
@ -20,9 +20,9 @@ import java.io.IOException;
|
|||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package org.springframework.boot.context.config;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.env.EnvironmentPostProcessor;
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.List;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
|
|
|
@ -19,9 +19,9 @@ package org.springframework.boot.context.config;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.springframework.boot.context.config;
|
|||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.env.EnvironmentPostProcessor;
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.function.Supplier;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package org.springframework.boot.context.event;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
package org.springframework.boot.context.event;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
|
|
@ -22,12 +22,12 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.SpringApplicationRunListener;
|
||||
import org.springframework.boot.availability.AvailabilityChangeEvent;
|
||||
import org.springframework.boot.availability.LivenessState;
|
||||
import org.springframework.boot.availability.ReadinessState;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package org.springframework.boot.env;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
|
|
@ -33,8 +33,8 @@ import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContrib
|
|||
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor;
|
||||
import org.springframework.beans.factory.aot.BeanFactoryInitializationCode;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationFailedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ import java.util.List;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.boot.util.Instantiator;
|
||||
import org.springframework.util.Assert;
|
||||
|
|
|
@ -18,9 +18,9 @@ package org.springframework.boot.env;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.io.support.SpringFactoriesLoader;
|
||||
import org.springframework.core.io.support.SpringFactoriesLoader.ArgumentResolver;
|
||||
|
|
|
@ -55,11 +55,11 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
|||
import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
import org.springframework.beans.factory.support.DefaultBeanNameGenerator;
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.availability.AvailabilityChangeEvent;
|
||||
import org.springframework.boot.availability.AvailabilityState;
|
||||
import org.springframework.boot.availability.LivenessState;
|
||||
import org.springframework.boot.availability.ReadinessState;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.builder.ParentContextApplicationContextInitializer;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.event.ApplicationContextInitializedEvent;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot;
|
||||
package org.springframework.boot.bootstrap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
@ -23,8 +23,8 @@ import org.assertj.core.api.AbstractAssert;
|
|||
import org.assertj.core.api.AssertProvider;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.BootstrapRegistry.Scope;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.Scope;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
|
@ -25,8 +25,8 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
|
|
|
@ -18,8 +18,8 @@ package org.springframework.boot.context;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
|||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.cloud.CloudPlatform;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributor.Kind;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributors.BinderOption;
|
||||
|
|
|
@ -19,9 +19,9 @@ package org.springframework.boot.context.config;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.context.config.TestConfigDataBootstrap.LoaderHelper;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.TestApplicationEnvironment;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigData.Options;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
|
|
|
@ -32,9 +32,9 @@ import org.junit.jupiter.api.TestInfo;
|
|||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.MockApplicationEnvironment;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributor.ImportPhase;
|
||||
import org.springframework.boot.context.config.ConfigDataEnvironmentContributor.Kind;
|
||||
import org.springframework.boot.context.config.TestConfigDataEnvironmentUpdateListener.AddedPropertySource;
|
||||
|
|
|
@ -27,11 +27,11 @@ import org.assertj.core.api.InstanceOfAssertFactories;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.core.test.io.support.MockSpringFactoriesLoader;
|
||||
|
|
|
@ -27,11 +27,11 @@ import org.junit.jupiter.api.io.TempDir;
|
|||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
|
|
|
@ -21,8 +21,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.springframework.boot.BootstrapContextClosedEvent;
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.BootstrapContextClosedEvent;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.core.env.MapPropertySource;
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.List;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.availability.AvailabilityChangeEvent;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.support.StaticApplicationContext;
|
||||
|
|
|
@ -48,9 +48,9 @@ import org.junit.jupiter.api.io.TempDir;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.bridge.SLF4JBridgeHandler;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationFailedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationStartingEvent;
|
||||
import org.springframework.boot.context.properties.bind.BindException;
|
||||
|
|
|
@ -38,10 +38,10 @@ import org.springframework.aot.AotDetector;
|
|||
import org.springframework.aot.test.generate.TestGenerationContext;
|
||||
import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationFailedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
||||
|
|
|
@ -21,8 +21,8 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.OverridingClassLoader;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.function.Supplier;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.logging.DeferredLogFactory;
|
||||
import org.springframework.core.OverridingClassLoader;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
|
|
|
@ -23,8 +23,8 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.boot.DefaultBootstrapContext;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
|
||||
import org.springframework.boot.context.event.ApplicationFailedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
|
|
|
@ -20,8 +20,8 @@ import java.util.function.Function;
|
|||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapRegistryInitializer;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistryInitializer;
|
||||
|
||||
/**
|
||||
* Allows the user to register a {@link BootstrapRegistryInitializer} with a custom
|
||||
|
|
|
@ -19,10 +19,10 @@ package smoketest.bootstrapregistry.external.svn;
|
|||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.springframework.boot.BootstrapContext;
|
||||
import org.springframework.boot.BootstrapContextClosedEvent;
|
||||
import org.springframework.boot.BootstrapRegistry;
|
||||
import org.springframework.boot.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.bootstrap.BootstrapContext;
|
||||
import org.springframework.boot.bootstrap.BootstrapContextClosedEvent;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry;
|
||||
import org.springframework.boot.bootstrap.BootstrapRegistry.InstanceSupplier;
|
||||
import org.springframework.boot.context.config.ConfigData;
|
||||
import org.springframework.boot.context.config.ConfigDataLoader;
|
||||
import org.springframework.boot.context.config.ConfigDataLoaderContext;
|
||||
|
|
Loading…
Reference in New Issue