From 85742d07753bd6db5e1176919284733b2a7b80a0 Mon Sep 17 00:00:00 2001 From: Robin de Silva Jayasinghe Date: Tue, 14 Jan 2025 16:42:59 +0100 Subject: [PATCH 1/3] add a box with clarification for java changes and restart --- java/developing-applications/running.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/developing-applications/running.md b/java/developing-applications/running.md index 2160cd704..a57f35935 100644 --- a/java/developing-applications/running.md +++ b/java/developing-applications/running.md @@ -31,6 +31,12 @@ Once this is added, you can use the restart capabilities of the Spring Boot Devt * Artifacts generated from CDS (schema.sql, CSN, EDMX) * Any other static resource +::: warning Restart for changed Java classes +Sometimes, it happens that a (saved) change to a Java class does not result in an application restart even though you would have expected it. The reason is that the restart support for the Spring Boot Devtools only listens to changed .class files. So, a changed class only is detected as changed after it has been built. + +In most IDEs a feature called *automatic build* is active. This takes care of automatically rebuilding each changed class. In case this feature is enabled the Devtools restart your CAP Java application nearly instantly. If it's disabled the application won't restart. In order to trigger the restart you need to trigger a rebuild of the project manually (or enable automatic rebuild). +::: + ### CDS Build The Spring Boot Devtools have no knowledge of any CDS tooling or the CAP Java runtime. Thus, they can't trigger a CDS build if there are changes in the CDS source files. For more information, please check the [Local Development Support](#local-development-support) section. From d65c996015bbdd1e84ec83c82463ca01455e86ed Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 15 Jan 2025 07:51:55 +0100 Subject: [PATCH 2/3] Update java/developing-applications/running.md Co-authored-by: Andre Meyering --- java/developing-applications/running.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/developing-applications/running.md b/java/developing-applications/running.md index a57f35935..6e82c7471 100644 --- a/java/developing-applications/running.md +++ b/java/developing-applications/running.md @@ -32,7 +32,7 @@ Once this is added, you can use the restart capabilities of the Spring Boot Devt * Any other static resource ::: warning Restart for changed Java classes -Sometimes, it happens that a (saved) change to a Java class does not result in an application restart even though you would have expected it. The reason is that the restart support for the Spring Boot Devtools only listens to changed .class files. So, a changed class only is detected as changed after it has been built. +Sometimes, it happens that a (saved) change to a Java class does not result in an application restart even though you would have expected it. The reason is that the restart support for the Spring Boot Devtools only listens to changed `.class` files. So, a changed class only is detected as changed after it has been built. In most IDEs a feature called *automatic build* is active. This takes care of automatically rebuilding each changed class. In case this feature is enabled the Devtools restart your CAP Java application nearly instantly. If it's disabled the application won't restart. In order to trigger the restart you need to trigger a rebuild of the project manually (or enable automatic rebuild). ::: From b1c50d51a37c58e5b6f2a7c0c47a42995bc1522c Mon Sep 17 00:00:00 2001 From: Mahati Shankar Date: Fri, 17 Jan 2025 16:42:54 +0100 Subject: [PATCH 3/3] rephrased message --- java/developing-applications/running.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/developing-applications/running.md b/java/developing-applications/running.md index 6e82c7471..f678e9a86 100644 --- a/java/developing-applications/running.md +++ b/java/developing-applications/running.md @@ -32,9 +32,7 @@ Once this is added, you can use the restart capabilities of the Spring Boot Devt * Any other static resource ::: warning Restart for changed Java classes -Sometimes, it happens that a (saved) change to a Java class does not result in an application restart even though you would have expected it. The reason is that the restart support for the Spring Boot Devtools only listens to changed `.class` files. So, a changed class only is detected as changed after it has been built. - -In most IDEs a feature called *automatic build* is active. This takes care of automatically rebuilding each changed class. In case this feature is enabled the Devtools restart your CAP Java application nearly instantly. If it's disabled the application won't restart. In order to trigger the restart you need to trigger a rebuild of the project manually (or enable automatic rebuild). +Spring Boot Devtools only detects changes to .class files. You need to enable the *automatic build* feature in your IDE which detects source file changes and rebuilds the .class file. If not, you have to manually rebuild your project to restart your CAP Java application. ::: ### CDS Build