Skip to content

Commit

Permalink
Relocate section on configuring DevTools' file system watcher
Browse files Browse the repository at this point in the history
Closes gh-20895
  • Loading branch information
mbhave committed Apr 22, 2020
1 parent 7d0b14f commit 16ac968
Showing 1 changed file with 20 additions and 18 deletions.
Expand Up @@ -917,6 +917,22 @@ Profile specific filenames (of the form `spring-boot-devtools-<profile>.properti



[[configuring-file-system-watcher]]
==== Configuring File System Watcher
{spring-boot-devtools-module-code}/filewatch/FileSystemWatcher.java[FileSystemWatcher] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes.
Since Spring Boot relies entirely on the IDE to compile and copy files into the location from where Spring Boot can read them, you might find that there are times when certain changes are not reflected when devtools restarts the application.
If you observe such problems constantly, try increasing the `spring.devtools.restart.poll-interval` and `spring.devtools.restart.quiet-period` parameters to the values that fit your development environment:

[source,properties,indent=0,configprops]
----
spring.devtools.restart.poll-interval=2s
spring.devtools.restart.quiet-period=1s
----

The monitored classpath folders are now polled every 2 seconds for changes, and a 1 second quiet period is maintained to make sure there are no additional class changes.



[[using-boot-devtools-remote]]
=== Remote Applications
The Spring Boot developer tools are not limited to local development.
Expand Down Expand Up @@ -1000,31 +1016,17 @@ Any updated resource is pushed to the remote application and (_if required_) tri
This can be helpful if you iterate on a feature that uses a cloud service that you do not have locally.
Generally, remote updates and restarts are much quicker than a full rebuild and deploy cycle.

NOTE: Files are only monitored when the remote client is running.
If you change a file before starting the remote client, it is not pushed to the remote server.



[[configuring-file-system-watcher]]
==== Configuring File System Watcher
{spring-boot-devtools-module-code}/filewatch/FileSystemWatcher.java[FileSystemWatcher] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes.
The changes are then uploaded to the remote application.
On a slower development environment, it may happen that the quiet period is not enough, and the changes in the classes may be split into batches.
The server is restarted after the first batch of class changes is uploaded.
The next batch can’t be sent to the application, since the server is restarting.

This is typically manifested by a warning in the `RemoteSpringApplication` logs about failing to upload some of the classes, and a consequent retry.
But it may also lead to application code inconsistency and failure to restart after the first batch of changes is uploaded.
If you observe such problems constantly, try increasing the `spring.devtools.restart.poll-interval` and `spring.devtools.restart.quiet-period` parameters to the values that fit your development environment.
See the <<configuring-file-system-watcher>> section for configuring these properties.

If you observe such problems constantly, try increasing the `spring.devtools.restart.poll-interval` and `spring.devtools.restart.quiet-period` parameters to the values that fit your development environment:

[source,properties,indent=0,configprops]
----
spring.devtools.restart.poll-interval=2s
spring.devtools.restart.quiet-period=1s
----

The monitored classpath folders are now polled every 2 seconds for changes, and a 1 second quiet period is maintained to make sure there are no additional class changes.
NOTE: Files are only monitored when the remote client is running.
If you change a file before starting the remote client, it is not pushed to the remote server.



Expand Down

0 comments on commit 16ac968

Please sign in to comment.