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
27031772
Commit
27031772
authored
May 28, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9330 from izeye:polish-20170626
* pr/9330: Polish
parents
9332a3a4
6939ff1e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
19 deletions
+16
-19
WebFluxAutoConfigurationTests.java
...configure/web/reactive/WebFluxAutoConfigurationTests.java
+2
-2
ConfigurationMetadataAnnotationProcessorTests.java
...cessor/ConfigurationMetadataAnnotationProcessorTests.java
+6
-6
InnerClassHierarchicalProperties.java
...tionsample/specific/InnerClassHierarchicalProperties.java
+1
-1
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+1
-1
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+2
-2
BeanBinder.java
...ingframework/boot/context/properties/bind/BeanBinder.java
+1
-4
ConfigurationPropertyNameTests.java
...ext/properties/source/ConfigurationPropertyNameTests.java
+1
-1
ConfigurationPropertySourcesTests.java
.../properties/source/ConfigurationPropertySourcesTests.java
+2
-2
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java
View file @
27031772
...
...
@@ -195,7 +195,7 @@ public class WebFluxAutoConfigurationTests {
assertThat
(
validator
).
isInstanceOf
(
ValidatorAdapter
.
class
);
Object
defaultValidator
=
this
.
context
.
getBean
(
"defaultValidator"
);
assertThat
(((
ValidatorAdapter
)
validator
).
getTarget
()).
isSameAs
(
defaultValidator
);
// Primary Spring validator is the one use by WebFlux behind the scenes
// Primary Spring validator is the one use
d
by WebFlux behind the scenes
assertThat
(
this
.
context
.
getBean
(
Validator
.
class
)).
isEqualTo
(
defaultValidator
);
}
...
...
@@ -257,7 +257,7 @@ public class WebFluxAutoConfigurationTests {
assertThat
(
validator
).
isInstanceOf
(
ValidatorAdapter
.
class
);
Object
defaultValidator
=
this
.
context
.
getBean
(
"defaultValidator"
);
assertThat
(((
ValidatorAdapter
)
validator
).
getTarget
()).
isSameAs
(
defaultValidator
);
// Primary Spring validator is the one use by WebFlux behind the scenes
// Primary Spring validator is the one use
d
by WebFlux behind the scenes
assertThat
(
this
.
context
.
getBean
(
Validator
.
class
)).
isEqualTo
(
defaultValidator
);
}
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java
View file @
27031772
...
...
@@ -65,7 +65,7 @@ import org.springframework.boot.configurationsample.specific.DoubleRegistrationP
import
org.springframework.boot.configurationsample.specific.ExcludedTypesPojo
;
import
org.springframework.boot.configurationsample.specific.GenericConfig
;
import
org.springframework.boot.configurationsample.specific.InnerClassAnnotatedGetterConfig
;
import
org.springframework.boot.configurationsample.specific.InnerClassHierachicalProperties
;
import
org.springframework.boot.configurationsample.specific.InnerClassHiera
r
chicalProperties
;
import
org.springframework.boot.configurationsample.specific.InnerClassProperties
;
import
org.springframework.boot.configurationsample.specific.InnerClassRootConfig
;
import
org.springframework.boot.configurationsample.specific.InvalidAccessorProperties
;
...
...
@@ -350,14 +350,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
}
@Test
public
void
innerClassPropertiesHierachical
()
throws
Exception
{
ConfigurationMetadata
metadata
=
compile
(
InnerClassHierachicalProperties
.
class
);
public
void
innerClassPropertiesHiera
r
chical
()
throws
Exception
{
ConfigurationMetadata
metadata
=
compile
(
InnerClassHiera
r
chicalProperties
.
class
);
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"config.foo"
)
.
ofType
(
InnerClassHierachicalProperties
.
Foo
.
class
));
.
ofType
(
InnerClassHiera
r
chicalProperties
.
Foo
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"config.foo.bar"
)
.
ofType
(
InnerClassHierachicalProperties
.
Bar
.
class
));
.
ofType
(
InnerClassHiera
r
chicalProperties
.
Bar
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withGroup
(
"config.foo.bar.baz"
)
.
ofType
(
InnerClassHierachicalProperties
.
Foo
.
Baz
.
class
));
.
ofType
(
InnerClassHiera
r
chicalProperties
.
Foo
.
Baz
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"config.foo.bar.baz.blah"
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"config.foo.bar.bling"
));
}
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/specific/InnerClassHierachicalProperties.java
→
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/specific/InnerClassHiera
r
chicalProperties.java
View file @
27031772
...
...
@@ -26,7 +26,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
* @author Madhura Bhave
*/
@ConfigurationProperties
(
prefix
=
"config"
)
public
class
InnerClassHierachicalProperties
{
public
class
InnerClassHiera
r
chicalProperties
{
private
Foo
foo
;
...
...
spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
27031772
...
...
@@ -1118,7 +1118,7 @@ public class SpringApplication {
* <p>
* The sources here are added to those that were set in the constructor. Most users
* should consider using {@link #getSources()}/{@link #setSources(Set)} rather than
*
this calling
method.
*
calling this
method.
* @param additionalPrimarySources the additional primary sources to add
* @see #SpringApplication(Class...)
* @see #getSources()
...
...
spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
27031772
...
...
@@ -401,7 +401,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
}
for
(
PropertySourceLoader
loader
:
this
.
propertySourceLoaders
)
{
for
(
String
ext
:
loader
.
getFileExtensions
())
{
loadForFileExten
t
ion
(
loader
,
profile
,
location
+
name
,
"."
+
ext
);
loadForFileExten
s
ion
(
loader
,
profile
,
location
+
name
,
"."
+
ext
);
}
}
}
...
...
@@ -411,7 +411,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
.
anyMatch
(
name
.
toLowerCase
()::
endsWith
);
}
private
void
loadForFileExten
t
ion
(
PropertySourceLoader
loader
,
Profile
profile
,
private
void
loadForFileExten
s
ion
(
PropertySourceLoader
loader
,
Profile
profile
,
String
prefix
,
String
ext
)
{
if
(
profile
!=
null
)
{
// Try the profile-specific file
...
...
spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BeanBinder.java
View file @
27031772
...
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
context
.
properties
.
bind
;
import
org.springframework.boot.context.properties.source.ConfigurationPropertyName
;
import
org.springframework.boot.context.properties.source.ConfigurationPropertySource
;
/**
* Internal strategy used by {@link Binder} to bind beans.
...
...
@@ -31,9 +30,7 @@ interface BeanBinder {
* Return a bound bean instance or {@code null} if the {@link BeanBinder} does not
* support the specified {@link Bindable}.
* @param name the name being bound
* @param target the bindable to bind names from underlying
* {@link ConfigurationPropertySource} cannot be iterated this method can be
* {@code false}, even though binding may ultimately succeed.
* @param target the bindable to bind
* @param context the bind context
* @param propertyBinder property binder
* @param <T> The source type
...
...
spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameTests.java
View file @
27031772
...
...
@@ -248,7 +248,7 @@ public class ConfigurationPropertyNameTests {
}
@Test
public
void
adapShouldStripInvalidChars
()
throws
Exception
{
public
void
adap
t
ShouldStripInvalidChars
()
throws
Exception
{
ConfigurationPropertyName
name
=
ConfigurationPropertyName
.
adapt
(
"f@@.b%r"
,
'.'
);
assertThat
(
name
.
getElement
(
0
,
Form
.
UNIFORM
)).
isEqualTo
(
"f"
);
assertThat
(
name
.
getElement
(
0
,
Form
.
ORIGINAL
)).
isEqualTo
(
"f"
);
...
...
spring-boot/src/test/java/org/springframework/boot/context/properties/source/ConfigurationPropertySourcesTests.java
View file @
27031772
...
...
@@ -79,7 +79,7 @@ public class ConfigurationPropertySourcesTests {
}
@Test
public
void
environmentProperyExpansionShouldWorkWhenAttached
()
throws
Exception
{
public
void
environmentProper
t
yExpansionShouldWorkWhenAttached
()
throws
Exception
{
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
Map
<
String
,
Object
>
source
=
new
LinkedHashMap
<>();
source
.
put
(
"fooBar"
,
"Spring ${barBaz} ${bar-baz}"
);
...
...
@@ -102,7 +102,7 @@ public class ConfigurationPropertySourcesTests {
}
@Test
public
void
fromPropertySourc
s
eShouldFlattenPropertySources
()
throws
Exception
{
public
void
fromPropertySourceShouldFlattenPropertySources
()
throws
Exception
{
StandardEnvironment
environment
=
new
StandardEnvironment
();
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"foo"
,
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"bar"
)));
...
...
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