Hi,
When I start my project all is OK. But if I use mvn clean command, I get this StackTrace:
Exception in thread "File Watcher" java.lang.IllegalArgumentException: Folder must not be a file
at org.springframework.util.Assert.isTrue(Assert.java:68)
at org.springframework.boot.devtools.filewatch.FolderSnapshot.(FolderSnapshot.java:55)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.getCurrentSnapshots(FileSystemWatcher.java:281)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.scan(FileSystemWatcher.java:254)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.run(FileSystemWatcher.java:239)
at java.lang.Thread.run(Thread.java:745)
My environment is:
Best regards,
Christophe
Are you running mvn clean while the application is running?
Yes. I run this command when my application is running.
Thanks. That's the problem, then. mvn clean deletes all your application's classes removing the directory that Dev Tools is monitoring. Rather than using Maven to build your application when using Dev Tools, you should rely on your IDEs support for compiling your project. For example, you should triggers IDEA's Make Project. See http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-devtools-restart for more details.
Ok. Thank you for your reply.
Thanks.@wilkinsona, you saved my day!
Most helpful comment
Are you running
mvn cleanwhile the application is running?