From 01e5292337cac869d8b95ce4bd38eca20587652b Mon Sep 17 00:00:00 2001 From: Tomi Virtanen Date: Mon, 30 Sep 2024 09:20:58 +0300 Subject: [PATCH] docs: add more details about applicationIdentifier (#3656) * docs: add more details about applicationIdentifier Explain how default application identifier is also hashed and prefixed with 'app-'. * Update articles/flow/configuration/properties.adoc Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> * Initial edit of changed text. * Editig all of document touched. * Third pass -- editing all of document touched. --------- Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> Co-authored-by: Russell J.T. Dyer <6652767+russelljtdyer@users.noreply.github.com> --- articles/flow/configuration/properties.adoc | 24 ++++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/articles/flow/configuration/properties.adoc b/articles/flow/configuration/properties.adoc index 446af4cefa..236febbdb8 100644 --- a/articles/flow/configuration/properties.adoc +++ b/articles/flow/configuration/properties.adoc @@ -7,22 +7,22 @@ order: 10 = Configuration Properties -You can change the behavior of Vaadin applications by setting the configuration properties. You can set them either through the system properties, or the servlet initialization parameters. See the <> for details. +You can change the behavior of Vaadin applications by setting the configuration properties. Either set them through the system properties, or with the servlet initialization parameters. See the <> for details. See also the <<{articles}/flow/integrations/spring/configuration#, Spring-specific instructions>> for Spring-based applications. [[system-properties]] -== Using System Properties +== System Properties -When using Java system properties to set Vaadin application parameters, the `vaadin.` prefix must be specified before each parameter name. The following example shows how to set the `pnpm.enable` system property when executing a Maven goal from the command-line: +When using Java system properties to set Vaadin application parameters, the `vaadin.` prefix has to be specified before each parameter name. The following shows how to set the `pnpm.enable` system property when executing a Maven goal from the command-line: [source,bash] ---- mvn jetty:run -Dvaadin.pnpm.enable=true ---- -You can configure system properties for Maven plugin executions. For instance, the following sets a Vaadin-specific system property when running the Jetty Maven plugin: +You can also configure system properties for Maven plugin executions. For instance, the following sets a Vaadin-specific system property when running the Jetty Maven plugin: [source,xml] ---- @@ -43,7 +43,7 @@ You can configure system properties for Maven plugin executions. For instance, t == Servlet Initialization Parameters -Another option for setting configuration properties is to use servlet initialization parameters. Use the Servlet 3.0 `@WebServlet` annotation. This requires you to configure your servlet, unless you want Vaadin Flow to do it, using default parameter values. +Another option for setting configuration properties is to use servlet initialization parameters. Use the Servlet 3.0 `@WebServlet` annotation. This requires you to configure your servlet -- unless you want Vaadin Flow to do it -- using default parameter values. [source,java] ---- @@ -85,14 +85,13 @@ Yet another approach is to use the [filename]`web.xml` file. Below is an example ---- - .System Properties Override Servlet Parameters [NOTE] -When a system property and a servlet parameter have the same name, the system property is used and the servlet parameter is ignored. +When a system property and a servlet parameter have the same name, the system property is used, while the servlet parameter is ignored. [[properties]] -== Configuration Properties +== Properties Defined The following table contains the properties that are defined in the [classname]`com.vaadin.server.DeploymentConfiguration` and [classname]`com.vaadin.flow.server.Constants` classes. They're listed in alphabetical order. If you use Spring Boot, you should add the `vaadin.` prefix to them (e.g., change `brotli` to `vaadin.brotli`). @@ -102,7 +101,7 @@ The following table contains the properties that are defined in the [classname]` |`applicationIdentifier` |`default-project-id` -|Application identifier that's generated by default based on the project build settings (e.g., Maven's `groupId` and `artifactId`) -- during a production build. The property is used by the daily active users license model only for the moment. It can be configured by developers to differentiate end-users distribution between the same applications running in a cluster -- ones that have the same group and artifact IDs. +|Application identifier that's generated by default based on the project build settings (e.g., Maven's `groupId` and `artifactId`, the string value is hashed and prefixed with `app-`) -- during a production build. The property is used only for the moment by the daily active users license model. It can be configured by developers to differentiate end-users distribution between the same applications running in a cluster -- ones that have the same group and artifact IDs. |`brotli` |`true` @@ -110,11 +109,11 @@ The following table contains the properties that are defined in the [classname]` |`closeIdleSessions` |`false` -|Closes the Vaadin session if no UI is active. A UI is considered active if it's open on the client-side and has any activity -- besides heartbeat requests. By default, heartbeat requests keep the Vaadin session open even when there is no user interaction. Set to `true` to close idle sessions. See `heartbeatInterval` below. +|Closes the Vaadin session if no UI is active. A UI is considered active if it's open on the client-side and has any activity -- besides heartbeat requests. By default, heartbeat requests keep the Vaadin session open even when there isn't any user interaction. Set to `true` to close idle sessions. See `heartbeatInterval` below. |`devmode.hostsAllowed` |`null` -|Defines the hosts allowed to access Vaadin development tools. A comma-separated list of allowed hosts should be provided as the value. The `?` and `\*` wildcards can be used (e.g., `192.168.1.*,172.17.?.*`). Loopback addresses are always allowed, regardless of the value set here. +|Defines the hosts allowed to access Vaadin development tools. A comma-separated list of allowed hosts should be provided as the value. The `?` and `*` wildcards can be used (e.g., `192.168.1.*,172.17.?.*`). Loopback addresses are always allowed, regardless of the value set here. |`devmode.liveReload.enabled` |`true` @@ -210,8 +209,7 @@ The following table contains the properties that are defined in the [classname]` |`sessionLockCheckStrategy` |assert -|When production mode is enabled, the Vaadin session lock check is done according to this setting. By default, the check is done only if assertions are also enabled: this is to avoid the small performance impact of continuously checking the lock status. Alternative values are 'log' to log a warning, or 'throw' to fail with an `IllegalStateException`. The 'log' option also logs a full stack trace, enabling you to determine any problematic calls to Vaadin UI components from background threads. This is since Vaadin Flow version 24.4. - +|When production mode is enabled, the Vaadin session lock check is done according to this setting. By default, the check is done only if assertions are also enabled: this is to avoid the small performance impact of checking continuously the lock status. Alternative values are 'log' to log a warning, or 'throw' to fail with an `IllegalStateException`. The 'log' option also logs a full stack trace, enabling you to determine any problematic calls to Vaadin UI components from background threads. This is since Vaadin Flow version 24.4. |===