Reputation: 654
I've been working with Rails, PHP and Node.js and used to auto reloading after code changes.
Now I'm trying Java and came to two commands:
gradle build --continuous
gradle bootRun
But I see changes only after I restart gradle bootRun
Is it possible to rebuild and rerun spring after each code change?
Upvotes: 0
Views: 138
Reputation: 1065
Spring developer tools will handle this for you. Just add following dependency in your Gradle build file.
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
}
For more details refer: https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html
Upvotes: 1