Hide loader classes from Tomcat's ServletContext resource paths
See gh-17538
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.ServletContainerInitializer;
|
||||
|
||||
@@ -88,6 +89,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Andy Wilkinson
|
||||
* @author Eddú Meléndez
|
||||
* @author Christoffer Sawicki
|
||||
* @author Dawid Antecki
|
||||
* @since 2.0.0
|
||||
* @see #setPort(int)
|
||||
* @see #setContextLifecycleListeners(Collection)
|
||||
@@ -751,7 +753,8 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
|
||||
|
||||
@Override
|
||||
public Set<String> listWebAppPaths(String path) {
|
||||
return this.delegate.listWebAppPaths(path);
|
||||
return this.delegate.listWebAppPaths(path).stream()
|
||||
.filter((p) -> !p.startsWith("org/springframework/boot/loader")).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user