From 0503079dc596ce974df17b21944725896f1747b1 Mon Sep 17 00:00:00 2001 From: "Billy T. Hernandez" Date: Sun, 29 Nov 2020 00:16:28 -0800 Subject: [PATCH 1/2] Document devtools restart with Maven/Gradle Update the documentation to help avoid confusion for people who aren't using an IDE. See gh-24271 --- .../spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index 1b1dd12ab357..11a6731b6c86 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -711,6 +711,7 @@ As DevTools monitors classpath resources, the only way to trigger a restart is t The way in which you cause the classpath to be updated depends on the IDE that you are using. In Eclipse, saving a modified file causes the classpath to be updated and triggers a restart. In IntelliJ IDEA, building the project (`Build +->+ Build Project`) has the same effect. +If using a build plugin, running `mvn compile` for Maven or `gradle build` for Gradle will trigger a restart. **** NOTE: As long as forking is enabled, you can also start your application by using the supported build plugins (Maven and Gradle), since DevTools needs an isolated application classloader to operate properly. From 10d3121e27c415db3c3047646542bb709f97e7ae Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 8 Dec 2020 16:24:18 -0800 Subject: [PATCH 2/2] Polish "Triggering a restart" formatting See gh-24271 --- .../src/main/asciidoc/using-spring-boot.adoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index 11a6731b6c86..2603be0fd598 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -708,10 +708,11 @@ Note that certain resources, such as static assets and view templates, <+ Build Project`) has the same effect. -If using a build plugin, running `mvn compile` for Maven or `gradle build` for Gradle will trigger a restart. +The way in which you cause the classpath to be updated depends on the IDE that you are using: + +* In Eclipse, saving a modified file causes the classpath to be updated and triggers a restart. +* In IntelliJ IDEA, building the project (`Build +->+ Build Project`) has the same effect. +* If using a build plugin, running `mvn compile` for Maven or `gradle build` for Gradle will trigger a restart. **** NOTE: As long as forking is enabled, you can also start your application by using the supported build plugins (Maven and Gradle), since DevTools needs an isolated application classloader to operate properly.