Issue
I have a web application and I´m using Spring Boot to run it. Every time I make a change in a .java
I have to make a mvn clean
and a mvn install
for this code to be updated in my running application.
Is there some workaround for this issue? Something like instant re-run on file save, or any way to make this process faster, maybe re-publishing only the .java
code?
PD: The .xhtml
views updates on the fly. If you need more app specific details just ask and I´ll post them. Thank you in advance.
Edit: I´ve also tried the spring.devtools.restart.additional-paths
porperty, but still not able to reload.
Dev tools - restart-additional-paths
Solution
Add below dependencies to your pom.xml, and it autodeploys your changed code in the embedded tomcat.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Answered By - Amit K Bist
Answer Checked By - Timothy Miller (JavaFixing Admin)