Reputation: 531
As we know org.springframework.boot
support hot deploy to detect any changes
without restart application.
It works with maven when I run it with mvn spring-boot:run
but it does not work when I run it with gradle bootRun
, it does not detect property file change automatically .
in my build.gradle
i defined it already.
any hints will be more than welcome!
compile group: 'org.springframework.boot', name: 'spring-boot-devtools', version:'2.0.4.RELEASE'
Upvotes: 1
Views: 507
Reputation: 116171
You probably need to configure bootRun
to load resources from src/main/resources
rather than their built location beneath build
. You can do so with the following configuration:
bootRun {
sourceResources sourceSets.main
}
Alternatively, you could use Gradle's continuous build support so that any changes in src/main/resources
or src/main/java
are automatically detected and then built. DevTools will then notice the changes in the build's output and reload.
Upvotes: 2