Polishing (backported from master)
This commit is contained in:
@@ -68,6 +68,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
|
||||
|
||||
private boolean autodetect = true;
|
||||
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
@@ -135,6 +136,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
|
||||
return this.autodetect;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
if (event.getApplicationContext() == this.applicationContext && isAutodetect()) {
|
||||
@@ -146,7 +148,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());
|
||||
@@ -223,7 +224,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 {
|
||||
|
||||
Reference in New Issue
Block a user