Use more flexible SpringFactoriesLoader

Closes gh-30235

Co-authored-by: Madhura Bhave <bhavem@vmware.com>
Co-authored-by: Stephane Nicoll <snicoll@vmware.com>
This commit is contained in:
Andy Wilkinson
2022-05-09 14:13:04 +01:00
parent 0fbfb8ef09
commit 770cb840c3
33 changed files with 440 additions and 311 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 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.
@@ -72,8 +72,8 @@ public final class RemoteSpringApplication {
private Collection<ApplicationListener<?>> getListeners() {
List<ApplicationListener<?>> listeners = new ArrayList<>();
listeners.add(new AnsiOutputApplicationListener());
listeners.add(new EnvironmentPostProcessorApplicationListener(
EnvironmentPostProcessorsFactory.of(ConfigDataEnvironmentPostProcessor.class)));
listeners.add(EnvironmentPostProcessorApplicationListener
.with(EnvironmentPostProcessorsFactory.of(ConfigDataEnvironmentPostProcessor.class)));
listeners.add(new LoggingApplicationListener());
listeners.add(new RemoteUrlPropertyExtractor());
return listeners;