Browse Source

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
pull/47268/head
Phillip Webb 6 months ago
parent
commit
4ebf09ad12
  1. 5
      config/checkstyle/import-control.xml
  2. 2
      core/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java
  3. 2
      core/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java
  4. 3
      core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
  5. 1
      core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationRunListener.java
  6. 1
      core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationRunListeners.java
  7. 4
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapContext.java
  8. 4
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapContextClosedEvent.java
  9. 4
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapRegistry.java
  10. 5
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapRegistryInitializer.java
  11. 4
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/ConfigurableBootstrapContext.java
  12. 4
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/DefaultBootstrapContext.java
  13. 24
      core/spring-boot/src/main/java/org/springframework/boot/bootstrap/package-info.java
  14. 4
      core/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java
  15. 6
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java
  16. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributors.java
  17. 4
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessor.java
  18. 6
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java
  19. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoaderContext.java
  20. 6
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoaders.java
  21. 6
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolver.java
  22. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolverContext.java
  23. 6
      core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java
  24. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationEnvironmentPreparedEvent.java
  25. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartingEvent.java
  26. 2
      core/spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunListener.java
  27. 6
      core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessor.java
  28. 2
      core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessorApplicationListener.java
  29. 2
      core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessorsFactory.java
  30. 6
      core/spring-boot/src/main/java/org/springframework/boot/env/ReflectionEnvironmentPostProcessorsFactory.java
  31. 6
      core/spring-boot/src/main/java/org/springframework/boot/env/SpringFactoriesEnvironmentPostProcessorsFactory.java
  32. 2
      core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
  33. 6
      core/spring-boot/src/test/java/org/springframework/boot/bootstrap/DefaultBootstrapContextTests.java
  34. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java
  35. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java
  36. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributorsTests.java
  37. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorBootstrapContextIntegrationTests.java
  38. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorTests.java
  39. 4
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java
  40. 10
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataLoadersTests.java
  41. 10
      core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataLocationResolversTests.java
  42. 4
      core/spring-boot/src/test/java/org/springframework/boot/context/config/TestConfigDataBootstrap.java
  43. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java
  44. 2
      core/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java
  45. 4
      core/spring-boot/src/test/java/org/springframework/boot/env/EnvironmentPostProcessorApplicationListenerTests.java
  46. 2
      core/spring-boot/src/test/java/org/springframework/boot/env/EnvironmentPostProcessorsFactoryTests.java
  47. 4
      core/spring-boot/src/test/java/org/springframework/boot/env/ReflectionEnvironmentPostProcessorsFactoryTests.java
  48. 2
      module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java
  49. 4
      smoke-test/spring-boot-smoke-test-bootstrap-registry/src/main/java/smoketest/bootstrapregistry/external/svn/SubversionBootstrap.java
  50. 8
      smoke-test/spring-boot-smoke-test-bootstrap-registry/src/main/java/smoketest/bootstrapregistry/external/svn/SubversionConfigDataLoader.java

5
config/checkstyle/import-control.xml

@ -13,7 +13,10 @@ @@ -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>

2
core/spring-boot-test/src/main/java/org/springframework/boot/test/context/ConfigDataApplicationContextInitializer.java

@ -16,8 +16,8 @@ @@ -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;

2
core/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java

@ -30,13 +30,13 @@ import org.springframework.aot.hint.RuntimeHints; @@ -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;

3
core/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

@ -58,6 +58,9 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -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;

1
core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationRunListener.java

@ -20,6 +20,7 @@ import java.time.Duration; @@ -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;

1
core/spring-boot/src/main/java/org/springframework/boot/SpringApplicationRunListeners.java

@ -23,6 +23,7 @@ import java.util.function.Consumer; @@ -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;

4
core/spring-boot/src/main/java/org/springframework/boot/BootstrapContext.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapContext.java

@ -14,7 +14,7 @@ @@ -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; @@ -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 {

4
core/spring-boot/src/main/java/org/springframework/boot/BootstrapContextClosedEvent.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapContextClosedEvent.java

@ -14,7 +14,7 @@ @@ -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; @@ -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 {

4
core/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistry.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapRegistry.java

@ -14,7 +14,7 @@ @@ -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; @@ -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
*/

5
core/spring-boot/src/main/java/org/springframework/boot/BootstrapRegistryInitializer.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/BootstrapRegistryInitializer.java

@ -14,15 +14,14 @@ @@ -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

4
core/spring-boot/src/main/java/org/springframework/boot/ConfigurableBootstrapContext.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/ConfigurableBootstrapContext.java

@ -14,14 +14,14 @@ @@ -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

4
core/spring-boot/src/main/java/org/springframework/boot/DefaultBootstrapContext.java → core/spring-boot/src/main/java/org/springframework/boot/bootstrap/DefaultBootstrapContext.java

@ -14,7 +14,7 @@ @@ -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; @@ -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 {

24
core/spring-boot/src/main/java/org/springframework/boot/bootstrap/package-info.java

@ -0,0 +1,24 @@ @@ -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;

4
core/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

@ -33,10 +33,10 @@ import org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironment.java

@ -26,10 +26,10 @@ import java.util.Set; @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributors.java

@ -29,7 +29,7 @@ import java.util.function.Predicate; @@ -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;

4
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessor.java

@ -24,9 +24,9 @@ import java.util.function.Supplier; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java

@ -20,9 +20,9 @@ import java.io.IOException; @@ -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;
/**

2
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoaderContext.java

@ -16,7 +16,7 @@ @@ -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;
/**

6
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoaders.java

@ -24,9 +24,9 @@ import java.util.List; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolver.java

@ -19,9 +19,9 @@ package org.springframework.boot.context.config; @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolverContext.java

@ -18,7 +18,7 @@ package org.springframework.boot.context.config; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java

@ -24,9 +24,9 @@ import java.util.function.Supplier; @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationEnvironmentPreparedEvent.java

@ -16,8 +16,8 @@ @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartingEvent.java

@ -16,8 +16,8 @@ @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunListener.java

@ -22,12 +22,12 @@ import org.apache.commons.logging.Log; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessor.java vendored

@ -16,10 +16,10 @@ @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessorApplicationListener.java vendored

@ -33,8 +33,8 @@ import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContrib @@ -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;

2
core/spring-boot/src/main/java/org/springframework/boot/env/EnvironmentPostProcessorsFactory.java vendored

@ -20,7 +20,7 @@ import java.util.List; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/env/ReflectionEnvironmentPostProcessorsFactory.java vendored

@ -23,9 +23,9 @@ import java.util.List; @@ -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;

6
core/spring-boot/src/main/java/org/springframework/boot/env/SpringFactoriesEnvironmentPostProcessorsFactory.java vendored

@ -18,9 +18,9 @@ package org.springframework.boot.env; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

@ -55,11 +55,11 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; @@ -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;

6
core/spring-boot/src/test/java/org/springframework/boot/DefaultBootstrapContextTests.java → core/spring-boot/src/test/java/org/springframework/boot/bootstrap/DefaultBootstrapContextTests.java

@ -14,7 +14,7 @@ @@ -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; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/ApplicationPidFileWriterTests.java

@ -25,8 +25,8 @@ import org.junit.jupiter.api.BeforeEach; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java

@ -18,8 +18,8 @@ package org.springframework.boot.context; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentContributorsTests.java

@ -30,7 +30,7 @@ import org.junit.jupiter.api.extension.ExtendWith; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorBootstrapContextIntegrationTests.java

@ -19,9 +19,9 @@ package org.springframework.boot.context.config; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorTests.java

@ -21,9 +21,9 @@ import java.util.function.Supplier; @@ -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;

4
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java

@ -32,9 +32,9 @@ import org.junit.jupiter.api.TestInfo; @@ -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;

10
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataLoadersTests.java

@ -27,11 +27,11 @@ import org.assertj.core.api.InstanceOfAssertFactories; @@ -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;

10
core/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataLocationResolversTests.java

@ -27,11 +27,11 @@ import org.junit.jupiter.api.io.TempDir; @@ -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;

4
core/spring-boot/src/test/java/org/springframework/boot/context/config/TestConfigDataBootstrap.java

@ -21,8 +21,8 @@ import java.util.Collections; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/event/EventPublishingRunListenerTests.java

@ -24,9 +24,9 @@ import java.util.List; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerTests.java

@ -48,9 +48,9 @@ import org.junit.jupiter.api.io.TempDir; @@ -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;

4
core/spring-boot/src/test/java/org/springframework/boot/env/EnvironmentPostProcessorApplicationListenerTests.java vendored

@ -38,10 +38,10 @@ import org.springframework.aot.AotDetector; @@ -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;

2
core/spring-boot/src/test/java/org/springframework/boot/env/EnvironmentPostProcessorsFactoryTests.java vendored

@ -21,8 +21,8 @@ import java.util.function.Supplier; @@ -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;

4
core/spring-boot/src/test/java/org/springframework/boot/env/ReflectionEnvironmentPostProcessorsFactoryTests.java vendored

@ -24,9 +24,9 @@ import java.util.function.Supplier; @@ -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;

2
module/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestartApplicationListenerTests.java

@ -23,8 +23,8 @@ import org.junit.jupiter.api.BeforeEach; @@ -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;

4
smoke-test/spring-boot-smoke-test-bootstrap-registry/src/main/java/smoketest/bootstrapregistry/external/svn/SubversionBootstrap.java vendored

@ -20,8 +20,8 @@ import java.util.function.Function; @@ -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

8
smoke-test/spring-boot-smoke-test-bootstrap-registry/src/main/java/smoketest/bootstrapregistry/external/svn/SubversionConfigDataLoader.java vendored

@ -19,10 +19,10 @@ package smoketest.bootstrapregistry.external.svn; @@ -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…
Cancel
Save