|
62 | 62 | import org.springframework.core.io.Resource;
|
63 | 63 | import org.springframework.core.io.ResourceLoader;
|
64 | 64 | import org.springframework.core.io.support.SpringFactoriesLoader;
|
65 |
| -import org.springframework.lang.Nullable; |
66 | 65 | import org.springframework.util.Assert;
|
67 | 66 | import org.springframework.util.ResourceUtils;
|
68 | 67 | import org.springframework.util.StringUtils;
|
@@ -152,6 +151,17 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
|
152 | 151 |
|
153 | 152 | private final ConversionService conversionService = new DefaultConversionService();
|
154 | 153 |
|
| 154 | + @Override |
| 155 | + public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) { |
| 156 | + return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(eventType) || |
| 157 | + ApplicationPreparedEvent.class.isAssignableFrom(eventType); |
| 158 | + } |
| 159 | + |
| 160 | + @Override |
| 161 | + public boolean supportsSourceType(Class<?> aClass) { |
| 162 | + return true; |
| 163 | + } |
| 164 | + |
155 | 165 | @Override
|
156 | 166 | public void onApplicationEvent(ApplicationEvent event) {
|
157 | 167 | if (event instanceof ApplicationEnvironmentPreparedEvent) {
|
@@ -277,17 +287,6 @@ public void setSearchNames(String names) {
|
277 | 287 | this.names = names;
|
278 | 288 | }
|
279 | 289 |
|
280 |
| - @Override |
281 |
| - public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) { |
282 |
| - return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(eventType) || |
283 |
| - ApplicationPreparedEvent.class.isAssignableFrom(eventType); |
284 |
| - } |
285 |
| - |
286 |
| - @Override |
287 |
| - public boolean supportsSourceType(@Nullable Class<?> aClass) { |
288 |
| - return true; |
289 |
| - } |
290 |
| - |
291 | 290 | /**
|
292 | 291 | * {@link BeanFactoryPostProcessor} to re-order our property sources below any
|
293 | 292 | * {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
|
|
0 commit comments