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-2021 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.
@@ -28,7 +28,7 @@ class MyConditionEvaluationReportingTests {
void autoConfigTest() {
// @formatter:off
new ApplicationContextRunner()
.withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO))
.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
.run((context) -> {
// Test something...
});

View File

@@ -28,7 +28,7 @@ class MyConditionEvaluationReportingTests {
@Test
fun autoConfigTest() {
ApplicationContextRunner()
.withInitializer(ConditionEvaluationReportLoggingListener(LogLevel.INFO))
.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
.run { context: AssertableApplicationContext? -> }
}