Skip to content

Commit 4eb73e0

Browse files
committed
Recommend that DevTools is excluded with custom packaging arrangement
Closes gh-15382
1 parent 4f2e788 commit 4eb73e0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

+7-4
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,13 @@ listings for Maven and Gradle:
762762

763763
NOTE: Developer tools are automatically disabled when running a fully packaged
764764
application. If your application is launched from `java -jar` or if it is started from a
765-
special classloader, then it is considered a "`production application`". Flagging the
766-
dependency as optional in Maven or using a custom`developmentOnly` configuration in
767-
Gradle (as shown above) is a best practice that prevents devtools from being transitively
768-
applied to other modules that use your project.
765+
special classloader, then it is considered a "`production application`". If that does not
766+
apply to you (i.e. if you run your application from a container), consider excluding
767+
devtools or set the `-Dspring.devtools.restart.enabled=false` system property.
768+
769+
TIP: Flagging the dependency as optional in Maven or using a custom`developmentOnly`
770+
configuration in Gradle (as shown above) is a best practice that prevents devtools from
771+
being transitively applied to other modules that use your project.
769772

770773
TIP: Repackaged archives do not contain devtools by default. If you want to use a
771774
<<using-boot-devtools-remote,certain remote devtools feature>>, you need to disable the

0 commit comments

Comments
 (0)