spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.73k stars 40.58k forks source link

Cross-reference other configuration properties more consistently #42482

Open MahatmaFatalError opened 3 days ago

MahatmaFatalError commented 3 days ago

This docu page https://docs.spring.io/spring-boot/appendix/application-properties/index.html#application-properties.server.server.tomcat.max-connections states: "Maximum number of connections that the server accepts and processes at any given time. Once the limit has been reached, the operating system may still accept connections based on the "acceptCount" property."

But if you search for "acceptCount" you will find nothing. I assume https://docs.spring.io/spring-boot/appendix/application-properties/index.html#application-properties.server.server.tomcat.accept-count server.tomcat.accept-count is meant with it. so I wanted to add a proper link to this property, however, it looks the adoc https://github.com/spring-projects/spring-boot/blob/v3.3.4/spring-boot-project/spring-boot-docs/src/docs/antora/modules/appendix/pages/application-properties/index.adoc is broken, at least I cannot find the sources where those properties are documented.

image

snicoll commented 3 days ago

This section of the doc is auto-generated from the configuration properties metadata and there is no way to link one property with another. The best we could do is change the case of "acceptCount" to be "accept-count" to reduce the confusion.

wilkinsona commented 3 days ago

Thanks for the suggestion. I'm not sure that we can cross-link due to the way that the documentation is generated. However, we may be able to improve things by, for example, using the full property name or using accept-count rather than acceptCount.

We have a few places where we reference other properties. If we decide to change the description of max-connections, the others should probably be changed too. They are:

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java#L433-L439

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/influx/InfluxProperties.java#L108-L112

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionProperties.java#L85-L90

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java#L50-L54

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java#L56-L60

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java#L94-L98

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java#L257-L261

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java#L485-L489

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java#L775-L779

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/newrelic/NewRelicProperties.java#L37-L43

https://github.com/spring-projects/spring-boot/blob/689bce88d2832c730eb75ceeeb2adb8270e983a4/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/newrelic/NewRelicProperties.java#L45-L49

wilkinsona commented 1 day ago

There are more places where we reference other properties that my previous search didn't find. For example, we have several where we use the fully-qualified name of the property when referencing it. The following are some of these:

https://github.com/spring-projects/spring-boot/blob/6aa5ed705a6b9e5bc4b08908024ff94a6615ff58/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasProperties.java#L81-L87

https://github.com/spring-projects/spring-boot/blob/6aa5ed705a6b9e5bc4b08908024ff94a6615ff58/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointProperties.java#L36-L39

https://github.com/spring-projects/spring-boot/blob/6aa5ed705a6b9e5bc4b08908024ff94a6615ff58/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.java#L51-L55