Introduce "server.servlet" configuration prefix
This commit refactors the `ServerProperties` property keys and introduces a separate "server.servlet" namespace to isolate servlet-specific properties from the rest. Closes gh-8066
This commit is contained in:
@@ -152,8 +152,6 @@ content into your application; rather pick only the properties that you need.
|
||||
server.compression.mime-types= # Comma-separated list of MIME types that should be compressed. For instance `text/html,text/css,application/json`
|
||||
server.compression.min-response-size= # Minimum response size that is required for compression to be performed. For instance 2048
|
||||
server.connection-timeout= # Time in milliseconds that connectors will wait for another HTTP request before closing the connection. When not set, the connector's container-specific default will be used. Use a value of -1 to indicate no (i.e. infinite) timeout.
|
||||
server.context-parameters.*= # Servlet context init parameters. For instance `server.context-parameters.a=alpha`
|
||||
server.context-path= # Context path of the application.
|
||||
server.display-name=application # Display name of the application.
|
||||
server.max-http-header-size=0 # Maximum size in bytes of the HTTP message header.
|
||||
server.error.include-stacktrace=never # When to include a "stacktrace" attribute.
|
||||
@@ -162,12 +160,14 @@ content into your application; rather pick only the properties that you need.
|
||||
server.jetty.acceptors= # Number of acceptor threads to use.
|
||||
server.jetty.max-http-post-size=0 # Maximum size in bytes of the HTTP post or put content.
|
||||
server.jetty.selectors= # Number of selector threads to use.
|
||||
server.jsp-servlet.class-name=org.apache.jasper.servlet.JspServlet # The class name of the JSP servlet.
|
||||
server.jsp-servlet.init-parameters.*= # Init parameters used to configure the JSP servlet
|
||||
server.jsp-servlet.registered=true # Whether or not the JSP servlet is registered
|
||||
server.port=8080 # Server HTTP port.
|
||||
server.server-header= # Value to use for the Server response header (no header is sent if empty)
|
||||
server.servlet-path=/ # Path of the main dispatcher servlet.
|
||||
server.servlet.context-parameters.*= # Servlet context init parameters. For instance `server.servlet.context-parameters.a=alpha`
|
||||
server.servlet.context-path= # Context path of the application.
|
||||
server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet # The class name of the JSP servlet.
|
||||
server.servlet.jsp.init-parameters.*= # Init parameters used to configure the JSP servlet
|
||||
server.servlet.jsp.registered=true # Whether or not the JSP servlet is registered
|
||||
server.servlet.path=/ # Path of the main dispatcher servlet.
|
||||
server.use-forward-headers= # If X-Forwarded-* headers should be applied to the HttpRequest.
|
||||
server.session.cookie.comment= # Comment for the session cookie.
|
||||
server.session.cookie.domain= # Domain for the session cookie.
|
||||
|
||||
@@ -42,7 +42,7 @@ categorized under "hints":
|
||||
"sourceType": "org.springframework.boot.autoconfigure.web.ServerProperties"
|
||||
},
|
||||
{
|
||||
"name": "server.servlet-path",
|
||||
"name": "server.servlet.path",
|
||||
"type": "java.lang.String",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.web.ServerProperties",
|
||||
"defaultValue": "/"
|
||||
@@ -84,18 +84,18 @@ categorized under "hints":
|
||||
----
|
||||
|
||||
Each "`property`" is a configuration item that the user specifies with a given value.
|
||||
For example `server.port` and `server.servlet-path` might be specified in
|
||||
For example `server.port` and `server.servlet.path` might be specified in
|
||||
`application.properties` as follows:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
server.port=9090
|
||||
server.servlet-path=/home
|
||||
server.servlet.path=/home
|
||||
----
|
||||
|
||||
The "`groups`" are higher level items that don't themselves specify a value, but instead
|
||||
provide a contextual grouping for properties. For example the `server.port` and
|
||||
`server.servlet-path` properties are part of the `server` group.
|
||||
`server.servlet.path` properties are part of the `server` group.
|
||||
|
||||
NOTE: It is not required that every "`property`" has a "`group`", some properties might
|
||||
just exist in their own right.
|
||||
@@ -160,7 +160,7 @@ The JSON object contained in the `properties` array can contain the following at
|
||||
|`name`
|
||||
| String
|
||||
| The full name of the property. Names are in lowercase dashed form (e.g.
|
||||
`server.servlet-path`). This attribute is mandatory.
|
||||
`server.servlet.path`). This attribute is mandatory.
|
||||
|
||||
|`type`
|
||||
| String
|
||||
@@ -270,7 +270,7 @@ The JSON object contained in the `hints` array can contain the following attribu
|
||||
|`name`
|
||||
| String
|
||||
| The full name of the property that this hint refers to. Names are in lowercase dashed
|
||||
form (e.g. `server.servlet-path`). If the property refers to a map (e.g.
|
||||
form (e.g. `server.servlet.path`). If the property refers to a map (e.g.
|
||||
`system.contexts`) the hint either applies to the _keys_ of the map (`system.context.keys`)
|
||||
or the values (`system.context.values`). This attribute is mandatory.
|
||||
|
||||
@@ -495,14 +495,14 @@ provider supports these parameters:
|
||||
|===
|
||||
|
||||
|
||||
The meta-data snippet below corresponds to the standard `server.jsp-servlet.class-name`
|
||||
The meta-data snippet below corresponds to the standard `server.servlet.jsp.class-name`
|
||||
property that defines the `JspServlet` class name to use:
|
||||
|
||||
[source,json,indent=0]
|
||||
----
|
||||
{"hints": [
|
||||
{
|
||||
"name": "server.jsp-servlet.class-name",
|
||||
"name": "server.servlet.jsp.class-name",
|
||||
"providers": [
|
||||
{
|
||||
"name": "class-reference",
|
||||
|
||||
@@ -2117,9 +2117,9 @@ Actuator HTTP endpoints are only available for Spring MVC-based applications. If
|
||||
to use Jersey and still use the actuator you will need to enable Spring MVC (by depending
|
||||
on `spring-boot-starter-web`, for example). By default, both Jersey and the Spring MVC
|
||||
dispatcher servlet are mapped to the same path (`/`). You will need to change the path for
|
||||
one of them (by configuring `server.servlet-path` for Spring MVC or
|
||||
one of them (by configuring `server.servlet.path` for Spring MVC or
|
||||
`spring.jersey.application-path` for Jersey). For example, if you add
|
||||
`server.servlet-path=/system` into `application.properties`, the actuator HTTP endpoints
|
||||
`server.servlet.path=/system` into `application.properties`, the actuator HTTP endpoints
|
||||
will be available under `/system`.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user