Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
42bf594d
Commit
42bf594d
authored
Sep 03, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish condition name
See gh-14285
parent
ba18fb52
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
OnPropertyListCondition.java
...boot/autoconfigure/condition/OnPropertyListCondition.java
+2
-2
OnBootstrapHostsCondition.java
...ot/autoconfigure/couchbase/OnBootstrapHostsCondition.java
+2
-2
OnWsdlLocationsCondition.java
...t/autoconfigure/webservices/OnWsdlLocationsCondition.java
+2
-2
OnPropertyListConditionTests.java
...autoconfigure/condition/OnPropertyListConditionTests.java
+5
-5
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnListCondition.java
→
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/On
Property
ListCondition.java
View file @
42bf594d
...
@@ -34,7 +34,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
...
@@ -34,7 +34,7 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
* @author Stephane Nicoll
* @author Stephane Nicoll
* @since 2.0.5
* @since 2.0.5
*/
*/
public
class
OnListCondition
extends
SpringBootCondition
{
public
class
On
Property
ListCondition
extends
SpringBootCondition
{
private
static
final
Bindable
<
List
<
String
>>
SIMPLE_LIST
=
Bindable
private
static
final
Bindable
<
List
<
String
>>
SIMPLE_LIST
=
Bindable
.
listOf
(
String
.
class
);
.
listOf
(
String
.
class
);
...
@@ -49,7 +49,7 @@ public class OnListCondition extends SpringBootCondition {
...
@@ -49,7 +49,7 @@ public class OnListCondition extends SpringBootCondition {
* @param messageBuilder a message builder supplier that should provide a fresh
* @param messageBuilder a message builder supplier that should provide a fresh
* instance on each call
* instance on each call
*/
*/
protected
OnListCondition
(
String
propertyName
,
protected
On
Property
ListCondition
(
String
propertyName
,
Supplier
<
ConditionMessage
.
Builder
>
messageBuilder
)
{
Supplier
<
ConditionMessage
.
Builder
>
messageBuilder
)
{
this
.
propertyName
=
propertyName
;
this
.
propertyName
=
propertyName
;
this
.
messageBuilder
=
messageBuilder
;
this
.
messageBuilder
=
messageBuilder
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/couchbase/OnBootstrapHostsCondition.java
View file @
42bf594d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
couchbase
;
package
org
.
springframework
.
boot
.
autoconfigure
.
couchbase
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
import
org.springframework.boot.autoconfigure.condition.OnListCondition
;
import
org.springframework.boot.autoconfigure.condition.On
Property
ListCondition
;
/**
/**
* Condition to determine if {@code spring.couchbase.bootstrap-hosts} is specified.
* Condition to determine if {@code spring.couchbase.bootstrap-hosts} is specified.
...
@@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
...
@@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
* @author Madhura Bhave
* @author Madhura Bhave
* @author Eneias Silva
* @author Eneias Silva
*/
*/
class
OnBootstrapHostsCondition
extends
OnListCondition
{
class
OnBootstrapHostsCondition
extends
On
Property
ListCondition
{
OnBootstrapHostsCondition
()
{
OnBootstrapHostsCondition
()
{
super
(
"spring.couchbase.bootstrap-hosts"
,
super
(
"spring.couchbase.bootstrap-hosts"
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/webservices/OnWsdlLocationsCondition.java
View file @
42bf594d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
webservices
;
package
org
.
springframework
.
boot
.
autoconfigure
.
webservices
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
import
org.springframework.boot.autoconfigure.condition.ConditionMessage
;
import
org.springframework.boot.autoconfigure.condition.OnListCondition
;
import
org.springframework.boot.autoconfigure.condition.On
Property
ListCondition
;
/**
/**
* Condition to determine if {@code spring.webservices.wsdl-locations} is specified.
* Condition to determine if {@code spring.webservices.wsdl-locations} is specified.
...
@@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
...
@@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.condition.OnListCondition;
* @author Eneias Silva
* @author Eneias Silva
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
class
OnWsdlLocationsCondition
extends
OnListCondition
{
class
OnWsdlLocationsCondition
extends
On
Property
ListCondition
{
OnWsdlLocationsCondition
()
{
OnWsdlLocationsCondition
()
{
super
(
"spring.webservices.wsdl-locations"
,
super
(
"spring.webservices.wsdl-locations"
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnListConditionTests.java
→
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/On
Property
ListConditionTests.java
View file @
42bf594d
...
@@ -26,11 +26,11 @@ import org.springframework.context.annotation.Configuration;
...
@@ -26,11 +26,11 @@ import org.springframework.context.annotation.Configuration;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
* Tests for {@link OnListCondition}.
* Tests for {@link On
Property
ListCondition}.
*
*
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
public
class
OnListConditionTests
{
public
class
On
Property
ListConditionTests
{
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withUserConfiguration
(
TestConfig
.
class
);
.
withUserConfiguration
(
TestConfig
.
class
);
...
@@ -65,7 +65,7 @@ public class OnListConditionTests {
...
@@ -65,7 +65,7 @@ public class OnListConditionTests {
}
}
@Configuration
@Configuration
@Conditional
(
TestListCondition
.
class
)
@Conditional
(
Test
Property
ListCondition
.
class
)
protected
static
class
TestConfig
{
protected
static
class
TestConfig
{
@Bean
@Bean
...
@@ -75,9 +75,9 @@ public class OnListConditionTests {
...
@@ -75,9 +75,9 @@ public class OnListConditionTests {
}
}
static
class
Test
ListCondition
extends
On
ListCondition
{
static
class
Test
PropertyListCondition
extends
OnProperty
ListCondition
{
TestListCondition
()
{
Test
Property
ListCondition
()
{
super
(
"spring.test.my-list"
,
()
->
ConditionMessage
.
forCondition
(
"test"
));
super
(
"spring.test.my-list"
,
()
->
ConditionMessage
.
forCondition
(
"test"
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment