Costa
Costa

Reputation: 654

Java Spring workflow

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

Answers (1)

Satish
Satish

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

Related Questions