I just started a Spring Boot project with Angular 4. And for Angular I can run npm start
so that NPM compiles every change. But I can't figure out how to do that for Spring Boot. I can find some sources for Eclipse/IntelliJ but I would like to stay with my Visual Studio Code editor.
A little late for this but I was searching for the same and got here. Maybe this could be useful for someone else.
The answer for that is in the documentation of spring.
Read here:
https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html
And then here:
https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html
In case you have problems with the links...
If your'e using Maven just add this dependency in your pom:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Or if you're using Gradle:
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
}
I hope this helps someone.
Open VSCode options (Ctrl+,) and search for 'hot code replace'. At Java Debugger, switch to 'auto'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With