From bc9191ce7ee6afe78e6bbafb9862bcb7155af504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 21 Dec 2023 10:02:07 +0100 Subject: [PATCH] Minor improvements to Dev Service config javadoc Mostly formatting and style, some phrasing. --- .../runtime/DataSourceBuildTimeConfig.java | 4 +++- .../runtime/DevServicesBuildTimeConfig.java | 24 ++++++++++--------- ...asticsearchDevServicesBuildTimeConfig.java | 19 +++++++++++---- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DataSourceBuildTimeConfig.java b/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DataSourceBuildTimeConfig.java index 7601b28b9e5bb..f500d4443522c 100644 --- a/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DataSourceBuildTimeConfig.java +++ b/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DataSourceBuildTimeConfig.java @@ -47,7 +47,9 @@ public interface DataSourceBuildTimeConfig { Optional dbVersion(); /** - * Configuration for DevServices. DevServices allows Quarkus to automatically start a database in dev and test mode. + * Configuration for Dev Services. + *

+ * Dev Services allow Quarkus to automatically start a database in dev and test mode. */ DevServicesBuildTimeConfig devservices(); diff --git a/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DevServicesBuildTimeConfig.java b/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DevServicesBuildTimeConfig.java index 475ab13131b1e..4b06ce1b1b4f5 100644 --- a/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DevServicesBuildTimeConfig.java +++ b/extensions/datasource/runtime/src/main/java/io/quarkus/datasource/runtime/DevServicesBuildTimeConfig.java @@ -10,17 +10,18 @@ public interface DevServicesBuildTimeConfig { /** - * If DevServices has been explicitly enabled or disabled. - * DevServices is generally enabled by default unless an existing configuration is present. + * Whether this Dev Service should start with the application in dev mode or tests. * - * When DevServices is enabled, Quarkus will attempt to automatically configure and start a database when running in Dev or - * Test mode. + * Dev Services are enabled by default + * unless connection configuration (e.g. the JDBC URL or reactive client URL) is set explicitly. + * + * @asciidoclet */ Optional enabled(); /** - * The container image name for container-based DevServices providers. - * + * The container image name for container-based Dev Service providers. + *

* This has no effect if the provider is not a container-based database, such as H2 or Derby. */ Optional imageName(); @@ -51,8 +52,8 @@ public interface DevServicesBuildTimeConfig { OptionalInt port(); /** - * The container start command to use for container-based DevServices providers. - * + * The container start command to use for container-based Dev Service providers. + *

* This has no effect if the provider is not a container-based database, such as H2 or Derby. */ Optional command(); @@ -74,20 +75,21 @@ public interface DevServicesBuildTimeConfig { /** * The path to a SQL script to be loaded from the classpath and applied to the Dev Service database. - * + *

* This has no effect if the provider is not a container-based database, such as H2 or Derby. */ Optional initScriptPath(); /** * The volumes to be mapped to the container. + *

* The map key corresponds to the host location; the map value is the container location. * If the host location starts with "classpath:", * the mapping loads the resource from the classpath with read-only permission. - * + *

* When using a file system location, the volume will be generated with read-write permission, * potentially leading to data loss or modification in your file system. - * + *

* This has no effect if the provider is not a container-based database, such as H2 or Derby. */ Map volumes(); diff --git a/extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/ElasticsearchDevServicesBuildTimeConfig.java b/extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/ElasticsearchDevServicesBuildTimeConfig.java index aa7c151e989ac..a2fb0e078fe3e 100644 --- a/extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/ElasticsearchDevServicesBuildTimeConfig.java +++ b/extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/ElasticsearchDevServicesBuildTimeConfig.java @@ -12,9 +12,12 @@ public class ElasticsearchDevServicesBuildTimeConfig { /** - * If Dev Services for Elasticsearch has been explicitly enabled or disabled. Dev Services are generally enabled - * by default, unless there is an existing configuration present. For Elasticsearch, Dev Services starts a server unless - * {@code quarkus.elasticsearch.hosts} is set. + * Whether this Dev Service should start with the application in dev mode or tests. + * + * Dev Services are enabled by default + * unless connection configuration (e.g. `quarkus.elasticsearch.hosts`) is set explicitly. + * + * @asciidoclet */ @ConfigItem public Optional enabled = Optional.empty(); @@ -28,6 +31,8 @@ public class ElasticsearchDevServicesBuildTimeConfig { public Optional port; /** + * The Elasticsearch distribution to use. + * * Defaults to a distribution inferred from the explicitly configured `image-name` (if any), * or by default to the distribution configured in depending extensions (e.g. Hibernate Search), * or by default to `elastic`. @@ -39,6 +44,7 @@ public class ElasticsearchDevServicesBuildTimeConfig { /** * The Elasticsearch container image to use. + * * Defaults depend on the configured `distribution`: * * * For the `elastic` distribution: {elasticsearch-image} @@ -51,13 +57,15 @@ public class ElasticsearchDevServicesBuildTimeConfig { /** * The value for the ES_JAVA_OPTS env variable. - * Defaults to setting the heap to 512MB min - 1GB max. + * + * @asciidoclet */ @ConfigItem(defaultValue = "-Xms512m -Xmx1g") public String javaOpts; /** - * Indicates if the Elasticsearch server managed by Quarkus Dev Services is shared. + * Whether the Elasticsearch server managed by Quarkus Dev Services is shared. + *

* When shared, Quarkus looks for running containers using label-based service discovery. * If a matching container is found, it is used, and so a second one is not started. * Otherwise, Dev Services for Elasticsearch starts a new container. @@ -72,6 +80,7 @@ public class ElasticsearchDevServicesBuildTimeConfig { /** * The value of the {@code quarkus-dev-service-elasticsearch} label attached to the started container. + *

* This property is used when {@code shared} is set to {@code true}. * In this case, before starting a container, Dev Services for Elasticsearch looks for a container with the * {@code quarkus-dev-service-elasticsearch} label