Skip to content

Commit c324f76

Browse files
mcollovatimshabarovjounirusselljtdyer
authored
chore: document hotswap plugin watched-packages setting (#3916)
* chore: document hotswap plugin watched-packages setting References vaadin/flow#20389 * Update hotswap-agent.adoc * apply review suggestions * Minor edist to added and surrounding text. --------- Co-authored-by: Mikhail Shabarov <[email protected]> Co-authored-by: Jouni Koivuviita <[email protected]> Co-authored-by: Russell J.T. Dyer <[email protected]>
1 parent a2a7c52 commit c324f76

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/flow/configuration/live-reload/hotswap-agent.adoc

+5-3
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ IntelliJ doesn't by default compile a Java file when you save it. If your habit
7777

7878
== Additional Considerations
7979

80-
You should disable other reloading or hot swapping solutions. For example, disable the automatic restart in the Jetty Maven plugin if you're using that. Omit or set `<scanIntervalSeconds>` to a value of `0` or less.
80+
You should disable other reloading or hot swapping solutions. For example, disable the automatic restart in the Jetty Maven plugin if you're using it. Omit or set `<scanIntervalSeconds>` to a value of `0` or less.
8181

82-
The live reload "quiet time" -- which is in milliseconds since the last Java change before refreshing the browser -- can be adjusted with the parameter `vaadin.liveReloadQuietTime` in the [filename]`hotswap-agent.properties` file. The default is 1000 ms. Increase this value if you notice the browser refreshing before modified Java files have been fully compiled.
82+
The live reload "quiet time" -- which is in milliseconds since the last Java change before refreshing the browser -- can be adjusted with the parameter `vaadin.liveReloadQuietTime` in the [filename]`hotswap-agent.properties` file. The default is 1000 ms. Increase this value if you notice the browser refreshing before modified Java files have been compiled fully.
8383

84-
Changes to some parts of the Java code, such application startup listeners, won't have any effect until the server is restarted and the startup listeners run again. For these you need to restart the server.
84+
You should configure the Vaadin Hotswap plugin to watch only for application classes by setting the `vaadin.watched-packages` property in the [filename]`hotswap-agent.properties` file. This improves performance, and prevents unnecessary reloads by limiting the plugin's monitoring to relevant packages. The value given should be a comma-separated list of Java package names (e.g., `com.example.ui,com.example.endpoints`).
85+
86+
Changes to some parts of the Java code, such application startup listeners, won't have any effect until the server is restarted and the startup listeners run again. For these, you need to restart the server.
8587

8688
If you're using the <<{articles}/flow/advanced/preserving-state-on-refresh#,`@PreserveOnRefresh`>> annotation, the same view instance is reused when the browser is reloaded. That means changes aren't necessarily visible until the view is opened in another browser tab.
8789

0 commit comments

Comments
 (0)