|
|
@ -1806,11 +1806,20 @@ Spring decides not to handle it. Most of the time this will not happen (unless y
|
|
|
|
the default MVC configuration) because Spring will always be able to handle requests
|
|
|
|
the default MVC configuration) because Spring will always be able to handle requests
|
|
|
|
through the `DispatcherServlet`.
|
|
|
|
through the `DispatcherServlet`.
|
|
|
|
|
|
|
|
|
|
|
|
You can customize the static resource locations using `spring.resources.staticLocations`
|
|
|
|
|
|
|
|
(replacing the default values with a list of directory locations). If you do this the
|
|
|
|
By default, resources are mapped on `/**` but you can tune that via
|
|
|
|
default welcome page detection will switch to your custom locations, so if there is an
|
|
|
|
`spring.mvc.static-path-pattern`. For instance, relocating all resources to `/resources/**`
|
|
|
|
`index.html` in any of your locations on startup, it will be the home page of the
|
|
|
|
can be achieved as follows:
|
|
|
|
application.
|
|
|
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
spring.mvc.static-path-pattern=/resources/**
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can also customize the static resource locations using
|
|
|
|
|
|
|
|
`spring.resources.static-locations` (replacing the default values with a list of directory
|
|
|
|
|
|
|
|
locations). If you do this the default welcome page detection will switch to your custom
|
|
|
|
|
|
|
|
locations, so if there is an `index.html` in any of your locations on startup, it will be
|
|
|
|
|
|
|
|
the home page of the application.
|
|
|
|
|
|
|
|
|
|
|
|
In addition to the '`standard`' static resource locations above, a special case is made
|
|
|
|
In addition to the '`standard`' static resource locations above, a special case is made
|
|
|
|
for http://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+`
|
|
|
|
for http://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+`
|
|
|
|