parent
ba18fb529f
commit
42bf594d96
|
@ -34,7 +34,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
|
|||
* @author Stephane Nicoll
|
||||
* @since 2.0.5
|
||||
*/
|
||||
public class OnListCondition extends SpringBootCondition {
|
||||
public class OnPropertyListCondition extends SpringBootCondition {
|
||||
|
||||
private static final Bindable<List<String>> SIMPLE_LIST = Bindable
|
||||
.listOf(String.class);
|
||||
|
@ -49,7 +49,7 @@ public class OnListCondition extends SpringBootCondition {
|
|||
* @param messageBuilder a message builder supplier that should provide a fresh
|
||||
* instance on each call
|
||||
*/
|
||||
protected OnListCondition(String propertyName,
|
||||
protected OnPropertyListCondition(String propertyName,
|
||||
Supplier<ConditionMessage.Builder> messageBuilder) {
|
||||
this.propertyName = propertyName;
|
||||
this.messageBuilder = messageBuilder;
|
|
@ -17,7 +17,7 @@
|
|||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
|
||||
import org.springframework.boot.autoconfigure.condition.OnListCondition;
|
||||
import org.springframework.boot.autoconfigure.condition.OnPropertyListCondition;
|
||||
|
||||
/**
|
||||
* Condition to determine if {@code spring.couchbase.bootstrap-hosts} is specified.
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
|
|||
* @author Madhura Bhave
|
||||
* @author Eneias Silva
|
||||
*/
|
||||
class OnBootstrapHostsCondition extends OnListCondition {
|
||||
class OnBootstrapHostsCondition extends OnPropertyListCondition {
|
||||
|
||||
OnBootstrapHostsCondition() {
|
||||
super("spring.couchbase.bootstrap-hosts",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package org.springframework.boot.autoconfigure.webservices;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionMessage;
|
||||
import org.springframework.boot.autoconfigure.condition.OnListCondition;
|
||||
import org.springframework.boot.autoconfigure.condition.OnPropertyListCondition;
|
||||
|
||||
/**
|
||||
* Condition to determine if {@code spring.webservices.wsdl-locations} is specified.
|
||||
|
@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
|
|||
* @author Eneias Silva
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
class OnWsdlLocationsCondition extends OnListCondition {
|
||||
class OnWsdlLocationsCondition extends OnPropertyListCondition {
|
||||
|
||||
OnWsdlLocationsCondition() {
|
||||
super("spring.webservices.wsdl-locations",
|
||||
|
|
|
@ -26,11 +26,11 @@ import org.springframework.context.annotation.Configuration;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link OnListCondition}.
|
||||
* Tests for {@link OnPropertyListCondition}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
public class OnListConditionTests {
|
||||
public class OnPropertyListConditionTests {
|
||||
|
||||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||
.withUserConfiguration(TestConfig.class);
|
||||
|
@ -65,7 +65,7 @@ public class OnListConditionTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@Conditional(TestListCondition.class)
|
||||
@Conditional(TestPropertyListCondition.class)
|
||||
protected static class TestConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -75,9 +75,9 @@ public class OnListConditionTests {
|
|||
|
||||
}
|
||||
|
||||
static class TestListCondition extends OnListCondition {
|
||||
static class TestPropertyListCondition extends OnPropertyListCondition {
|
||||
|
||||
TestListCondition() {
|
||||
TestPropertyListCondition() {
|
||||
super("spring.test.my-list", () -> ConditionMessage.forCondition("test"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue