-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Description
As seen in #8485, spring.resources.static-locations
lists classpath and servlet locations as default values. This was causing the leaking of the whole classpath as static resources.
This has been fixed by overriding the ResourceLoader.getResourceByPath(String path)
method in the reactive application context, a similar approach taken in #7880.
We can see a reactive web application as an application with no ServletContext
and still keep this fix in place. In that case, "/"
is still listed in the default values for static locations, and we're keeping the concept of Servlet resources in the context of non-servlet based applications.
On the other hand, we could revisit the ResourceProperties
keys and separate those values in different keys, like spring.resources.static-locations
and spring.resources.servlet-locations
. We would still have to combine both locations lists when configuring Servlet-based applications.