Update to fix issues introduced in Boot 2.0.0.M1
This commit is contained in:
@@ -62,7 +62,7 @@ public class ConfigurationPropertiesRebinder
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
private Map<String, Exception> errors = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
private boolean resetting = false;
|
||||
|
||||
public ConfigurationPropertiesRebinder(
|
||||
@@ -129,7 +129,7 @@ public class ConfigurationPropertiesRebinder
|
||||
|
||||
private void resetBinder() {
|
||||
try {
|
||||
setField(binder, "binder", null);
|
||||
setField(binder, "propertySources", null);
|
||||
binder.afterPropertiesSet();
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.config.ConfigFileApplicationListener;
|
||||
import org.springframework.cloud.bootstrap.BootstrapApplicationListener;
|
||||
@@ -65,7 +66,8 @@ public class ContextRefresher {
|
||||
StandardEnvironment environment = copyEnvironment(
|
||||
this.context.getEnvironment());
|
||||
SpringApplicationBuilder builder = new SpringApplicationBuilder(Empty.class)
|
||||
.bannerMode(Mode.OFF).web(false).environment(environment);
|
||||
.bannerMode(Mode.OFF).web(WebApplicationType.NONE)
|
||||
.environment(environment);
|
||||
// Just the listeners that affect the environment (e.g. excluding logging
|
||||
// listener because it has side effects)
|
||||
builder.application()
|
||||
|
||||
@@ -151,7 +151,7 @@ public class RefreshScope extends GenericScope
|
||||
try {
|
||||
ConfigurationPropertiesBindingPostProcessor processor = context
|
||||
.getBean(ConfigurationPropertiesBindingPostProcessor.class);
|
||||
setField(processor, "binder", null);
|
||||
setField(processor, "propertySources", null);
|
||||
processor.afterPropertiesSet();
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user