Polishing

This commit is contained in:
Juergen Hoeller
2021-03-08 23:45:56 +01:00
parent 48688b7b04
commit 530fb0808d
4 changed files with 9 additions and 9 deletions

View File

@@ -67,6 +67,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
private boolean autodetect = true;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
@@ -134,6 +135,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
return this.autodetect;
}
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
if (event.getApplicationContext() == this.applicationContext && isAutodetect()) {
@@ -145,7 +147,6 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
}
protected void detectResourceHandlers(ApplicationContext appContext) {
Map<String, SimpleUrlHandlerMapping> beans = appContext.getBeansOfType(SimpleUrlHandlerMapping.class);
List<SimpleUrlHandlerMapping> mappings = new ArrayList<>(beans.values());
@@ -225,7 +226,6 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
*/
@Nullable
public final String getForLookupPath(String lookupPath) {
// Clean duplicate slashes or pathWithinPattern won't match lookupPath
String previous;
do {