Skip to content

Commit 12c1da2

Browse files
committed
Polish contribution
See spring-projectsgh-32004
1 parent c441baf commit 12c1da2

File tree

1 file changed

+3
-10
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/web

1 file changed

+3
-10
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc

+3-10
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,10 @@ If you set the configprop:spring.mvc.message-codes-resolver-format[] property `P
127127
By default, Spring Boot serves static content from a directory called `/static` (or `/public` or `/resources` or `/META-INF/resources`) in the classpath or from the root of the `ServletContext`.
128128
It uses the `ResourceHttpRequestHandler` from Spring MVC so that you can modify that behavior by adding your own `WebMvcConfigurer` and overriding the `addResourceHandlers` method.
129129

130-
In a stand-alone web application, default servlet is not enabled. It can be enabled as follows:
130+
In a stand-alone web application, the default servlet from the container is not enabled.
131+
It can be enabled using the configprop:server.servlet.register-default-servlet[] property.
131132

132-
133-
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
134-
----
135-
server:
136-
servlet:
137-
register-default-servlet: true
138-
----
139-
140-
If the default servlet is enablend it acts as a fallback, serving content from the root of the `ServletContext` if Spring decides not to handle it.
133+
The default servlet acts as a fallback, serving content from the root of the `ServletContext` if Spring decides not to handle it.
141134
Most of the time, this does not happen (unless you modify the default MVC configuration), because Spring can always handle requests through the `DispatcherServlet`.
142135

143136
By default, resources are mapped on `+/**+`, but you can tune that with the configprop:spring.mvc.static-path-pattern[] property.

0 commit comments

Comments
 (0)