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
fd045f0e
Commit
fd045f0e
authored
Jun 29, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
parents
e52a3283
7f8a8ba1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+13
-2
ConfigurationPropertiesBindingPostProcessor.java
...operties/ConfigurationPropertiesBindingPostProcessor.java
+2
-1
No files found.
spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
fd045f0e
...
@@ -45,9 +45,9 @@ import org.springframework.boot.env.PropertySourceLoader;
...
@@ -45,9 +45,9 @@ import org.springframework.boot.env.PropertySourceLoader;
import
org.springframework.boot.env.RandomValuePropertySource
;
import
org.springframework.boot.env.RandomValuePropertySource
;
import
org.springframework.boot.logging.DeferredLog
;
import
org.springframework.boot.logging.DeferredLog
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ConfigurationClassPostProcessor
;
import
org.springframework.context.annotation.ConfigurationClassPostProcessor
;
import
org.springframework.context.event.SmartApplicationListener
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.AnnotationAwareOrderComparator
;
import
org.springframework.core.annotation.AnnotationAwareOrderComparator
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.ConfigurableEnvironment
;
...
@@ -93,7 +93,7 @@ import org.springframework.util.StringUtils;
...
@@ -93,7 +93,7 @@ import org.springframework.util.StringUtils;
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
public
class
ConfigFileApplicationListener
implements
EnvironmentPostProcessor
,
public
class
ConfigFileApplicationListener
implements
EnvironmentPostProcessor
,
ApplicationListener
<
ApplicationEvent
>
,
Ordered
{
SmartApplicationListener
,
Ordered
{
private
static
final
String
DEFAULT_PROPERTIES
=
"defaultProperties"
;
private
static
final
String
DEFAULT_PROPERTIES
=
"defaultProperties"
;
...
@@ -140,6 +140,17 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
...
@@ -140,6 +140,17 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
private
int
order
=
DEFAULT_ORDER
;
private
int
order
=
DEFAULT_ORDER
;
@Override
public
boolean
supportsEventType
(
Class
<?
extends
ApplicationEvent
>
eventType
)
{
return
ApplicationEnvironmentPreparedEvent
.
class
.
isAssignableFrom
(
eventType
)
||
ApplicationPreparedEvent
.
class
.
isAssignableFrom
(
eventType
);
}
@Override
public
boolean
supportsSourceType
(
Class
<?>
aClass
)
{
return
true
;
}
@Override
@Override
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
if
(
event
instanceof
ApplicationEnvironmentPreparedEvent
)
{
if
(
event
instanceof
ApplicationEnvironmentPreparedEvent
)
{
...
...
spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessor.java
View file @
fd045f0e
...
@@ -452,7 +452,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
...
@@ -452,7 +452,8 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
if
(
AnnotatedElementUtils
.
hasAnnotation
(
type
,
Validated
.
class
))
{
if
(
AnnotatedElementUtils
.
hasAnnotation
(
type
,
Validated
.
class
))
{
return
true
;
return
true
;
}
}
if
(
type
.
getPackage
().
getName
().
startsWith
(
"org.springframework.boot"
))
{
if
(
type
.
getPackage
()
!=
null
&&
type
.
getPackage
().
getName
().
startsWith
(
"org.springframework.boot"
))
{
return
false
;
return
false
;
}
}
if
(
getConstraintsForClass
(
type
).
isBeanConstrained
())
{
if
(
getConstraintsForClass
(
type
).
isBeanConstrained
())
{
...
...
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