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
26b27d41
Commit
26b27d41
authored
Jun 29, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Narrow the event types ConfigFileApplicationListener supports"
Closes gh-9628
parent
d2685728
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
ConfigFileApplicationListener.java
...rk/boot/context/config/ConfigFileApplicationListener.java
+11
-12
No files found.
spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
View file @
26b27d41
...
@@ -62,7 +62,6 @@ import org.springframework.core.io.DefaultResourceLoader;
...
@@ -62,7 +62,6 @@ import org.springframework.core.io.DefaultResourceLoader;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.io.support.SpringFactoriesLoader
;
import
org.springframework.core.io.support.SpringFactoriesLoader
;
import
org.springframework.lang.Nullable
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ResourceUtils
;
import
org.springframework.util.ResourceUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
...
@@ -152,6 +151,17 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
...
@@ -152,6 +151,17 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
private
final
ConversionService
conversionService
=
new
DefaultConversionService
();
private
final
ConversionService
conversionService
=
new
DefaultConversionService
();
@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
)
{
...
@@ -277,17 +287,6 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
...
@@ -277,17 +287,6 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
this
.
names
=
names
;
this
.
names
=
names
;
}
}
@Override
public
boolean
supportsEventType
(
Class
<?
extends
ApplicationEvent
>
eventType
)
{
return
ApplicationEnvironmentPreparedEvent
.
class
.
isAssignableFrom
(
eventType
)
||
ApplicationPreparedEvent
.
class
.
isAssignableFrom
(
eventType
);
}
@Override
public
boolean
supportsSourceType
(
@Nullable
Class
<?>
aClass
)
{
return
true
;
}
/**
/**
* {@link BeanFactoryPostProcessor} to re-order our property sources below any
* {@link BeanFactoryPostProcessor} to re-order our property sources below any
* {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
* {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
...
...
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