From 1def245a2cb7f5aa520531059956c3c3794625d7 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 25 Jan 2021 23:06:39 -0800 Subject: [PATCH] Support DeferredLogFactory injection Update `ConfigDataLoader` and `ConfigDataLocationResolver` to support `DeferredLogFactory` injection. Closes gh-24988 --- .../boot/context/config/ConfigDataLoader.java | 6 ++-- .../context/config/ConfigDataLoaders.java | 3 +- .../config/ConfigDataLocationResolver.java | 6 ++-- .../config/ConfigDataLocationResolvers.java | 1 + .../config/ConfigDataLoadersTests.java | 36 ++++++++++++++++++- .../ConfigDataLocationResolversTests.java | 35 +++++++++++++++++- 6 files changed, 80 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java index 22e5d3a754..eaea00ca3a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 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. @@ -23,6 +23,7 @@ import org.apache.commons.logging.Log; import org.springframework.boot.BootstrapContext; import org.springframework.boot.BootstrapRegistry; import org.springframework.boot.ConfigurableBootstrapContext; +import org.springframework.boot.logging.DeferredLogFactory; /** * Strategy class that can be used used to load {@link ConfigData} for a given @@ -30,7 +31,8 @@ import org.springframework.boot.ConfigurableBootstrapContext; * {@code spring.factories} entries. The following constructor parameter types are * supported: *