Skip to content

Commit 1b10d3f

Browse files
committed
Fix missing metadata for nested POJO
This commit fixes missing descriptions and default values when applicable for `management.server.ssl`, `server.compression`, `server.http2`, `server.servlet.jsp`, `server.servlet.session` and `server.ssl`. Those nested namespace are managed by a POJO that is declared outside of the module of the target @ConfigurationProperties type using it. As a result, the annotation processor has no access to the source model and can't extract the description and the default value, if any. This commit migrates the misleading field-level Javadoc to manual meta data for the time being. Closes gh-14669
1 parent a220326 commit 1b10d3f

File tree

8 files changed

+401
-139
lines changed

8 files changed

+401
-139
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,68 @@
279279
"level": "error"
280280
}
281281
},
282+
{
283+
"name": "management.server.ssl.ciphers",
284+
"description": "Supported SSL ciphers."
285+
},
286+
{
287+
"name": "management.server.ssl.client-auth",
288+
"description": "Whether client authentication is wanted (\"want\") or needed (\"need\"). Requires a trust store."
289+
},
290+
{
291+
"name": "management.server.ssl.enabled",
292+
"description": "Whether to enable SSL support.",
293+
"defaultValue": true
294+
},
295+
{
296+
"name": "management.server.ssl.enabled-protocols",
297+
"description": "Enabled SSL protocols."
298+
},
299+
{
300+
"name": "management.server.ssl.key-alias",
301+
"description": "Alias that identifies the key in the key store."
302+
},
303+
{
304+
"name": "management.server.ssl.key-password",
305+
"description": "Password used to access the key in the key store."
306+
},
307+
{
308+
"name": "management.server.ssl.key-store",
309+
"description": "Path to the key store that holds the SSL certificate (typically a jks file)."
310+
},
311+
{
312+
"name": "management.server.ssl.key-store-password",
313+
"description": "Password used to access the key store."
314+
},
315+
{
316+
"name": "management.server.ssl.key-store-provider",
317+
"description": "Provider for the key store."
318+
},
319+
{
320+
"name": "management.server.ssl.key-store-type",
321+
"description": "Type of the key store."
322+
},
323+
{
324+
"name": "management.server.ssl.protocol",
325+
"description": "SSL protocol to use.",
326+
"defaultValue": "TLS"
327+
},
328+
{
329+
"name": "management.server.ssl.trust-store",
330+
"description": "Trust store that holds SSL certificates."
331+
},
332+
{
333+
"name": "management.server.ssl.trust-store-password",
334+
"description": "Password used to access the trust store."
335+
},
336+
{
337+
"name": "management.server.ssl.trust-store-provider",
338+
"description": "Provider for the trust store."
339+
},
340+
{
341+
"name": "management.server.ssl.trust-store-type",
342+
"description": "Type of the trust store."
343+
},
282344
{
283345
"name": "management.trace.http.enabled",
284346
"type": "java.lang.Boolean",

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,169 @@
2929
"level": "error"
3030
}
3131
},
32+
{
33+
"name": "server.compression.enabled",
34+
"description": "Whether response compression is enabled.",
35+
"defaultValue": false
36+
},
37+
{
38+
"name": "server.compression.excluded-user-agents",
39+
"description": "Comma-separated list of user agents for which responses should not be compressed."
40+
},
41+
{
42+
"name": "server.compression.mime-types",
43+
"description": "Comma-separated list of MIME types that should be compressed.",
44+
"defaultValue": [
45+
"text/html",
46+
"text/xml",
47+
"text/plain",
48+
"text/css",
49+
"text/javascript",
50+
"application/javascript",
51+
"application/json",
52+
"application/xml"
53+
]
54+
},
55+
{
56+
"name": "server.compression.min-response-size",
57+
"description": "Minimum \"Content-Length\" value that is required for compression to be performed.",
58+
"defaultValue": 2048
59+
},
3260
{
3361
"name": "server.error.include-stacktrace",
3462
"defaultValue": "never"
3563
},
64+
{
65+
"name": "server.http2.enabled",
66+
"description": "Whether to enable HTTP/2 support, if the current environment supports it.",
67+
"defaultValue": false
68+
},
3669
{
3770
"name": "server.port",
3871
"defaultValue": 8080
3972
},
73+
{
74+
"name": "server.servlet.jsp.class-name",
75+
"description": "Class name of the servlet to use for JSPs. If registered is true and this class\n\t * is on the classpath then it will be registered.",
76+
"defaultValue": "org.apache.jasper.servlet.JspServlet"
77+
},
78+
{
79+
"name": "server.servlet.jsp.init-parameters",
80+
"description": "Init parameters used to configure the JSP servlet."
81+
},
82+
{
83+
"name": "server.servlet.jsp.registered",
84+
"description": "Whether the JSP servlet is registered.",
85+
"defaultValue": true
86+
},
87+
{
88+
"name": "server.servlet.session.cookie.comment",
89+
"description": "Comment for the session cookie."
90+
},
91+
{
92+
"name": "server.servlet.session.cookie.domain",
93+
"description": " Domain for the session cookie."
94+
},
95+
{
96+
"name": "server.servlet.session.cookie.http-only",
97+
"description": "Whether to use \"HttpOnly\" cookies for session cookies."
98+
},
99+
{
100+
"name": "server.servlet.session.cookie.max-age",
101+
"description": "Maximum age of the session cookie. If a duration suffix is not specified, seconds will be used."
102+
},
103+
{
104+
"name": "server.servlet.session.cookie.name",
105+
"description": "Session cookie name."
106+
},
107+
{
108+
"name": "server.servlet.session.cookie.path",
109+
"description": "Path of the session cookie."
110+
},
111+
{
112+
"name": "server.servlet.session.cookie.secure",
113+
"description": "Whether to always mark the session cookie as secure."
114+
},
115+
{
116+
"name": "server.servlet.session.persistent",
117+
"description": "Whether to persist session data between restarts.",
118+
"defaultValue": false
119+
},
120+
{
121+
"name": "server.servlet.session.store-dir",
122+
"description": "Directory used to store session data."
123+
},
124+
{
125+
"name": "server.servlet.session.timeout",
126+
"description": "Session timeout. If a duration suffix is not specified, seconds will be used.",
127+
"defaultValue": "30m"
128+
},
129+
{
130+
"name": "server.servlet.session.tracking-modes",
131+
"description": "Session tracking modes."
132+
},
133+
{
134+
"name": "server.ssl.ciphers",
135+
"description": "Supported SSL ciphers."
136+
},
137+
{
138+
"name": "server.ssl.client-auth",
139+
"description": "Whether client authentication is wanted (\"want\") or needed (\"need\"). Requires a trust store."
140+
},
141+
{
142+
"name": "server.ssl.enabled",
143+
"description": "Whether to enable SSL support.",
144+
"defaultValue": true
145+
},
146+
{
147+
"name": "server.ssl.enabled-protocols",
148+
"description": "Enabled SSL protocols."
149+
},
150+
{
151+
"name": "server.ssl.key-alias",
152+
"description": "Alias that identifies the key in the key store."
153+
},
154+
{
155+
"name": "server.ssl.key-password",
156+
"description": "Password used to access the key in the key store."
157+
},
158+
{
159+
"name": "server.ssl.key-store",
160+
"description": "Path to the key store that holds the SSL certificate (typically a jks file)."
161+
},
162+
{
163+
"name": "server.ssl.key-store-password",
164+
"description": "Password used to access the key store."
165+
},
166+
{
167+
"name": "server.ssl.key-store-provider",
168+
"description": "Provider for the key store."
169+
},
170+
{
171+
"name": "server.ssl.key-store-type",
172+
"description": "Type of the key store."
173+
},
174+
{
175+
"name": "server.ssl.protocol",
176+
"description": "SSL protocol to use.",
177+
"defaultValue": "TLS"
178+
},
179+
{
180+
"name": "server.ssl.trust-store",
181+
"description": "Trust store that holds SSL certificates."
182+
},
183+
{
184+
"name": "server.ssl.trust-store-password",
185+
"description": "Password used to access the trust store."
186+
},
187+
{
188+
"name": "server.ssl.trust-store-provider",
189+
"description": "Provider for the trust store."
190+
},
191+
{
192+
"name": "server.ssl.trust-store-type",
193+
"description": "Type of the trust store."
194+
},
40195
{
41196
"name": "spring.aop.auto",
42197
"type": "java.lang.Boolean",

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ content into your application. Rather, pick only the properties that you need.
166166
# EMBEDDED SERVER CONFIGURATION ({sc-spring-boot-autoconfigure}/web/ServerProperties.{sc-ext}[ServerProperties])
167167
server.address= # Network address to which the server should bind.
168168
server.compression.enabled=false # Whether response compression is enabled.
169-
server.compression.excluded-user-agents= # List of user-agents to exclude from compression.
170-
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript # Comma-separated list of MIME types that should be compressed.
169+
server.compression.excluded-user-agents= # Comma-separated list of user agents for which responses should not be compressed.
170+
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml # Comma-separated list of MIME types that should be compressed.
171171
server.compression.min-response-size=2048 # Minimum "Content-Length" value that is required for compression to be performed.
172172
server.connection-timeout= # Time that connectors wait for another HTTP request before closing the connection. When not set, the connector's container-specific default is used. Use a value of -1 to indicate no (that is, an infinite) timeout.
173173
server.error.include-exception=false # Include the "exception" attribute.
@@ -197,24 +197,24 @@ content into your application. Rather, pick only the properties that you need.
197197
server.servlet.context-parameters.*= # Servlet context init parameters.
198198
server.servlet.context-path= # Context path of the application.
199199
server.servlet.application-display-name=application # Display name of the application.
200-
server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet # The class name of the JSP servlet.
200+
server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet # Class name of the servlet to use for JSPs.
201201
server.servlet.jsp.init-parameters.*= # Init parameters used to configure the JSP servlet.
202202
server.servlet.jsp.registered=true # Whether the JSP servlet is registered.
203203
server.servlet.path=/ # Path of the main dispatcher servlet.
204204
server.servlet.session.cookie.comment= # Comment for the session cookie.
205205
server.servlet.session.cookie.domain= # Domain for the session cookie.
206-
server.servlet.session.cookie.http-only= # "HttpOnly" flag for the session cookie.
206+
server.servlet.session.cookie.http-only= # Whether to use "HttpOnly" cookies for session cookies.
207207
server.servlet.session.cookie.max-age= # Maximum age of the session cookie. If a duration suffix is not specified, seconds will be used.
208208
server.servlet.session.cookie.name= # Session cookie name.
209209
server.servlet.session.cookie.path= # Path of the session cookie.
210-
server.servlet.session.cookie.secure= # "Secure" flag for the session cookie.
210+
server.servlet.session.cookie.secure= # Whether to always mark the session cookie as secure.
211211
server.servlet.session.persistent=false # Whether to persist session data between restarts.
212212
server.servlet.session.store-dir= # Directory used to store session data.
213-
server.servlet.session.timeout= # Session timeout. If a duration suffix is not specified, seconds will be used.
214-
server.servlet.session.tracking-modes= # Session tracking modes (one or more of the following: "cookie", "url", "ssl").
213+
server.servlet.session.timeout=30m # Session timeout. If a duration suffix is not specified, seconds will be used.
214+
server.servlet.session.tracking-modes= # Session tracking modes.
215215
server.ssl.ciphers= # Supported SSL ciphers.
216216
server.ssl.client-auth= # Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store.
217-
server.ssl.enabled= # Enable SSL support.
217+
server.ssl.enabled=true # Whether to enable SSL support.
218218
server.ssl.enabled-protocols= # Enabled SSL protocols.
219219
server.ssl.key-alias= # Alias that identifies the key in the key store.
220220
server.ssl.key-password= # Password used to access the key in the key store.
@@ -1148,21 +1148,21 @@ content into your application. Rather, pick only the properties that you need.
11481148
management.server.address= # Network address to which the management endpoints should bind. Requires a custom management.server.port.
11491149
management.server.port= # Management endpoint HTTP port (uses the same port as the application by default). Configure a different port to use management-specific SSL.
11501150
management.server.servlet.context-path= # Management endpoint context-path (for instance, `/management`). Requires a custom management.server.port.
1151-
management.server.ssl.ciphers= # Supported SSL ciphers. Requires a custom management.port.
1152-
management.server.ssl.client-auth= # Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store. Requires a custom management.server.port.
1153-
management.server.ssl.enabled= # Whether to enable SSL support. Requires a custom management.server.port.
1154-
management.server.ssl.enabled-protocols= # Enabled SSL protocols. Requires a custom management.server.port.
1155-
management.server.ssl.key-alias= # Alias that identifies the key in the key store. Requires a custom management.server.port.
1156-
management.server.ssl.key-password= # Password used to access the key in the key store. Requires a custom management.server.port.
1157-
management.server.ssl.key-store= # Path to the key store that holds the SSL certificate (typically a jks file). Requires a custom management.server.port.
1158-
management.server.ssl.key-store-password= # Password used to access the key store. Requires a custom management.server.port.
1159-
management.server.ssl.key-store-provider= # Provider for the key store. Requires a custom management.server.port.
1160-
management.server.ssl.key-store-type= # Type of the key store. Requires a custom management.server.port.
1161-
management.server.ssl.protocol=TLS # SSL protocol to use. Requires a custom management.server.port.
1162-
management.server.ssl.trust-store= # Trust store that holds SSL certificates. Requires a custom management.server.port.
1163-
management.server.ssl.trust-store-password= # Password used to access the trust store. Requires a custom management.server.port.
1164-
management.server.ssl.trust-store-provider= # Provider for the trust store. Requires a custom management.server.port.
1165-
management.server.ssl.trust-store-type= # Type of the trust store. Requires a custom management.server.port.
1151+
management.server.ssl.ciphers= # Supported SSL ciphers.
1152+
management.server.ssl.client-auth= # Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store.
1153+
management.server.ssl.enabled=true # Whether to enable SSL support.
1154+
management.server.ssl.enabled-protocols= # Enabled SSL protocols.
1155+
management.server.ssl.key-alias= # Alias that identifies the key in the key store.
1156+
management.server.ssl.key-password= # Password used to access the key in the key store.
1157+
management.server.ssl.key-store= # Path to the key store that holds the SSL certificate (typically a jks file).
1158+
management.server.ssl.key-store-password= # Password used to access the key store.
1159+
management.server.ssl.key-store-provider= # Provider for the key store.
1160+
management.server.ssl.key-store-type= # Type of the key store.
1161+
management.server.ssl.protocol=TLS # SSL protocol to use.
1162+
management.server.ssl.trust-store= # Trust store that holds SSL certificates.
1163+
management.server.ssl.trust-store-password= # Password used to access the trust store.
1164+
management.server.ssl.trust-store-provider= # Provider for the trust store.
1165+
management.server.ssl.trust-store-type= # Type of the trust store.
11661166
11671167
# CLOUDFOUNDRY
11681168
management.cloudfoundry.enabled=true # Whether to enable extended Cloud Foundry actuator endpoints.

0 commit comments

Comments
 (0)