• Andy Wilkinson's avatar
    Prevent webapp class loader from finding resources · ded7cea7
    Andy Wilkinson authored
    Previously, TomcatEmbeddedWebappClassLoader would find resources
    in WEB-INF/classes. However, unlike standalone Tomcat, we know that in
    a Boot app WEB-INF/classes is on the class path of the parent class
    loader so the resources will be found when the parent is queried
    (which happens as part of the normal search algortithm for both
    getResource(String) and getResources(String)).
    
    This commit overrides findResource(String) and findResources(String)
    to return null and an empty enumeration respectively. This prevents
    TomcatEmbeddedWebappClassLoader from finding resources in
    WEB-INF/classes and returning war: URLs for them that duplicate the
    jar: URLs that will be found when the parent is queried.
    
    Closes gh-9014
    ded7cea7
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...