From 17ea7e65f15a99cc1a4c9a1312efd8e24d6f6cf3 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Sat, 19 Oct 2024 22:07:06 -0500 Subject: [PATCH] Add additional config props metadata file This commit adds the additional-spring-configuration-metadata.json file to the autoconfigure module so that we can add default values for properties whose defaults can not be determined. --- .../main/antora/modules/ROOT/partials/_configprops.adoc | 2 +- .../additional-spring-configuration-metadata.json | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 spring-grpc-spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json diff --git a/spring-grpc-docs/src/main/antora/modules/ROOT/partials/_configprops.adoc b/spring-grpc-docs/src/main/antora/modules/ROOT/partials/_configprops.adoc index 485ebc53..b3f535e3 100644 --- a/spring-grpc-docs/src/main/antora/modules/ROOT/partials/_configprops.adoc +++ b/spring-grpc-docs/src/main/antora/modules/ROOT/partials/_configprops.adoc @@ -27,7 +27,7 @@ |spring.grpc.server.keep-alive.timeout | `+++20s+++` | Maximum time to wait for read activity after sending a keep alive ping. If sender does not receive an acknowledgment within this time, it will close the connection (default 20s). |spring.grpc.server.max-inbound-message-size | `+++4194304B+++` | Maximum message size allowed to be received by the server (default 4MiB). |spring.grpc.server.max-inbound-metadata-size | `+++8192B+++` | Maximum metadata size allowed to be received by the server (default 8KiB). -|spring.grpc.server.port | | Server port to listen on. When the value is 0, a random available port is selected. The default is 9090. +|spring.grpc.server.port | `+++9090+++` | Server port to listen on. When the value is 0, a random available port is selected. The default is 9090. |spring.grpc.server.shutdown-grace-period | `+++30s+++` | Maximum time to wait for the server to gracefully shutdown. When the value is negative, the server waits forever. When the value is 0, the server will force shutdown immediately. The default is 30 seconds. |spring.grpc.server.ssl.bundle | | SSL bundle name. |spring.grpc.server.ssl.enabled | | Whether to enable SSL support. Enabled automatically if "bundle" is provided unless specified otherwise. diff --git a/spring-grpc-spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-grpc-spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 00000000..7102b598 --- /dev/null +++ b/spring-grpc-spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,9 @@ +{ + "groups": [], + "properties": [ + { + "name": "spring.grpc.server.port", + "defaultValue": "9090" + } + ] +}