Fail build on missing configuration property descriptions

Closes gh-31916
This commit is contained in:
Andy Wilkinson
2022-07-29 12:35:54 +01:00
parent d540eefce0
commit fa73b73898
11 changed files with 386 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,10 +30,19 @@ import org.springframework.boot.actuate.metrics.AutoTimer;
*/
public final class AutoTimeProperties implements AutoTimer {
/**
* Whether to enable auto-timing.
*/
private boolean enabled = true;
/**
* Whether to publish percentile histrograms.
*/
private boolean percentilesHistogram;
/**
* Percentiles for which additional time series should be published.
*/
private double[] percentiles;
/**

View File

@@ -97,10 +97,20 @@ public class WavefrontProperties extends PushRegistryProperties {
public static class Sender {
/**
* Maximum queue size of the in-memory buffer.
*/
private int maxQueueSize = 50000;
/**
* Interval at which points are flushed to the Wavefront server.
*/
private Duration flushInterval = Duration.ofSeconds(1);
/**
* Maximum message size, such that each batch is reported as one or more messages
* where no message exceeds the specified size.
*/
private DataSize messageSize = DataSize.ofBytes(Integer.MAX_VALUE);
public int getMaxQueueSize() {

View File

@@ -243,15 +243,6 @@
"description": "Whether to enable Solr health check.",
"defaultValue": true
},
{
"name": "management.health.status.order",
"defaultValue": [
"DOWN",
"OUT_OF_SERVICE",
"UP",
"UNKNOWN"
]
},
{
"name": "management.info.build.enabled",
"type": "java.lang.Boolean",

View File

@@ -123,7 +123,7 @@ class HealthEndpointAutoConfigurationTests {
@Test
void runWhenHasHttpCodeStatusMapperBeanIgnoresProperties() {
this.contextRunner.withUserConfiguration(HttpCodeStatusMapperConfiguration.class)
.withPropertyValues("management.health.status.http-mapping.up=123").run((context) -> {
.withPropertyValues("management.endpoint.health.status.http-mapping.up=123").run((context) -> {
HttpCodeStatusMapper mapper = context.getBean(HttpCodeStatusMapper.class);
assertThat(mapper.getStatusCode(Status.UP)).isEqualTo(456);
});

View File

@@ -257,3 +257,13 @@ dependencies {
testRuntimeOnly("jakarta.management.j2ee:jakarta.management.j2ee-api")
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect")
}
tasks.named("checkSpringConfigurationMetadata").configure {
exclusions = [
"spring.datasource.dbcp2.*",
"spring.datasource.hikari.*",
"spring.datasource.oracleucp.*",
"spring.datasource.tomcat.*",
"spring.groovy.template.configuration.*"
]
}

View File

@@ -1738,8 +1738,14 @@ public class ServerProperties {
public static class Options {
/**
* Socket options as defined in org.xnio.Options.
*/
private Map<String, String> socket = new LinkedHashMap<>();
/**
* Server options as defined in io.undertow.UndertowOptions.
*/
private Map<String, String> server = new LinkedHashMap<>();
public Map<String, String> getServer() {

View File

@@ -129,17 +129,67 @@
"name": "server.port",
"defaultValue": 8080
},
{
"name": "server.reactive.session.cookie.domain",
"description": "Domain for the cookie."
},
{
"name": "server.reactive.session.cookie.http-only",
"description": "Whether to use \"HttpOnly\" cookies for the cookie."
},
{
"name": "server.reactive.session.cookie.max-age",
"description": "Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no \"Max-Age\"."
},
{
"name": "server.reactive.session.cookie.name",
"description": "Name for the cookie."
},
{
"name": "server.reactive.session.cookie.path",
"description": "Path of the cookie."
},
{
"name": "server.reactive.session.cookie.same-site",
"description": "SameSite setting for the cookie."
},
{
"name": "server.reactive.session.cookie.secure",
"description": "Whether to always mark the cookie as secure."
},
{
"name": "server.servlet.encoding.charset",
"description": "Charset of HTTP requests and responses. Added to the \"Content-Type\" header if not set explicitly.",
"defaultValue": "UTF-8"
},
{
"name": "server.servlet.encoding.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable http encoding support.",
"defaultValue": true
},
{
"name": "server.servlet.encoding.force",
"description": "Whether to force the encoding to the configured charset on HTTP requests and responses."
},
{
"name": "server.servlet.encoding.force-request",
"description": "Whether to force the encoding to the configured charset on HTTP requests. Defaults to true when \"force\" has not been specified."
},
{
"name": "server.servlet.encoding.force-response",
"description": "Whether to force the encoding to the configured charset on HTTP responses."
},
{
"name": "server.servlet.encoding.mapping",
"description": "Mapping of locale to charset for response encoding."
},
{
"name": "server.servlet.jsp.class-name",
"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.",
"defaultValue": "org.apache.jasper.servlet.JspServlet"
},
{
"name": "server.servlet.jsp.init-parameters",
"description": "Init parameters used to configure the JSP servlet."
@@ -159,6 +209,38 @@
"level": "error"
}
},
{
"name": "server.servlet.session.cookie.comment",
"description": "Comment for the cookie."
},
{
"name": "server.servlet.session.cookie.domain",
"description": "Domain for the cookie."
},
{
"name": "server.servlet.session.cookie.http-only",
"description": "Whether to use \"HttpOnly\" cookies for the cookie."
},
{
"name": "server.servlet.session.cookie.max-age",
"description": "Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no \"Max-Age\"."
},
{
"name": "server.servlet.session.cookie.name",
"description": "Name of the cookie."
},
{
"name": "server.servlet.session.cookie.path",
"description": "Path of the cookie."
},
{
"name": "server.servlet.session.cookie.same-site",
"description": "SameSite setting for the cookie."
},
{
"name": "server.servlet.session.cookie.secure",
"description": "Whether to always mark the cookie as secure."
},
{
"name": "server.servlet.session.persistent",
"description": "Whether to persist session data between restarts.",
@@ -1928,6 +2010,68 @@
"level": "error"
}
},
{
"name": "spring.rsocket.server.ssl.ciphers",
"description": "Supported SSL ciphers."
},
{
"name": "spring.rsocket.server.ssl.client-auth",
"description": "Client authentication mode. Requires a trust store."
},
{
"name": "spring.rsocket.server.ssl.enabled",
"description": "Whether to enable SSL support.",
"defaultValue": true
},
{
"name": "spring.rsocket.server.ssl.enabled-protocols",
"description": "Enabled SSL protocols."
},
{
"name": "spring.rsocket.server.ssl.key-alias",
"description": "Alias that identifies the key in the key store."
},
{
"name": "spring.rsocket.server.ssl.key-password",
"description": "Password used to access the key in the key store."
},
{
"name": "spring.rsocket.server.ssl.key-store",
"description": "Path to the key store that holds the SSL certificate (typically a jks file)."
},
{
"name": "spring.rsocket.server.ssl.key-store-password",
"description": "Password used to access the key store."
},
{
"name": "spring.rsocket.server.ssl.key-store-provider",
"description": "Provider for the key store."
},
{
"name": "spring.rsocket.server.ssl.key-store-type",
"description": "Type of the key store."
},
{
"name": "spring.rsocket.server.ssl.protocol",
"description": "SSL protocol to use.",
"defaultValue": "TLS"
},
{
"name": "spring.rsocket.server.ssl.trust-store",
"description": "Trust store that holds SSL certificates."
},
{
"name": "spring.rsocket.server.ssl.trust-store-password",
"description": "Password used to access the trust store."
},
{
"name": "spring.rsocket.server.ssl.trust-store-provider",
"description": "Provider for the trust store."
},
{
"name": "spring.rsocket.server.ssl.trust-store-type",
"description": "Type of the trust store."
},
{
"name": "spring.rsocket.server.transport",
"defaultValue": "tcp"
@@ -2035,10 +2179,6 @@
"description": "Whether to enable Spring's HiddenHttpMethodFilter.",
"defaultValue": false
},
{
"name": "spring.webflux.session.timeout",
"defaultValue": "30m"
},
{
"name": "spring.webservices.wsdl-locations",
"type": "java.util.List<java.lang.String>",

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ public class Encoding {
private Boolean forceResponse;
/**
* Locale in which to encode mapping.
* Mapping of locale to charset for response encoding..
*/
private Map<Locale, Charset> mapping;

View File

@@ -324,6 +324,7 @@
{
"name": "spring.jpa.defer-datasource-initialization",
"type": "java.lang.Boolean",
"description": "Whether to defer DataSource initialization until after any EntityManagerFactory beans have been created and initialized.",
"defaultValue": false
},
{