Spring-Boot-Devtools does not want to restart the process (does not select the correct class paths)?

I have a small Spring boot project (from spring-boot-starter). Everything is configured, I want to use spring-Boot-Devtools to automatically restart. When I run my project (mvn spring-boot: run -X) from my git repo working directory, I can see:

maven logs:

DEBUG] Class path for forked: C: \ Users \ Razor \ git \ spring-boot starter \ target \ classes, ........

which is good, the way looks good. and then application logs:

2016-09-21 23: 47: 59.568 DEBUG 13528 --- [restartedMain] .blClasspathLoggingApplicationListener: the application is launched using classpath: []

is classpath empty? there is probably a problem that Devtools does not want to automatically restart my application. But why?

When I copy the project folder (no other changes !!!) to another location, the reboot works!

Maven (mvn spring-boot: run -X):

[DEBUG] The class class for the forked process: C: \ Java \ workspace_rentit \ spring-boot-starter2 \ target \ classes, .....

and later:

2016-09-21 23: 40: 34.224 DEBUG 4060 --- [restartedMain] .blClasspathLoggingApplicationListener: the application is launched using classpath [file: / C: / Java / workspace_rentit / spring-boot-starter2 / target / classes /]

Why are there differences? What's wrong? in the second case, the reboot works.

+7
spring spring-boot maven reload spring-boot-devtools
source share
2 answers

Well, after scrolling through the project for a few more minutes, I found that the problem is probably the project folder name "spring-boot-starter" (the default project name from eclipse spring is the boot creator?) So the reboot in another folder worked (folder name the project was different), after changing the name of the project folder in my git registry, the reboot started working again.

Is this a documented β€œfeature”? :)

looks like a DIRECTORY project should not be called 'spring-boot -....' (it is not associated with an artifact name or project name eclipse)

+2
source share

Spring Boot ignores some project names when considering whether to automatically restart. This is described in the documentation :

When deciding whether an element on the class path should restart when it changes, DevTools automatically ignores projects named spring-boot, spring-boot-devtools, spring-boot-autoconfigure, spring - boot-actuator and spring-boot -starter

You must rename your project so that it clears it as part of the Spring boot itself and has the right to automatic reloads.

+5
source share

All Articles