From a862b6dc79583326bada345d59e492b1aa490b70 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 28 Dec 2016 10:14:22 +0100 Subject: [PATCH] Polish documentation Closes gh-7771 --- .../main/asciidoc/spring-boot-features.adoc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 4a2879e54c5..b70ad234730 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1804,11 +1804,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 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 -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. + +By default, resources are mapped on `/**` but you can tune that via +`spring.mvc.static-path-pattern`. For instance, relocating all resources to `/resources/**` +can be achieved as follows: + +---- + 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 for http://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+`