Spring boot app debug static file reload
已回答
Hi, I'm using IntelliJ with a simple spring boot app (no web facet), and it seems that when I run with intellij, the static files do not reload unless I do a "rebuild project". If I just use maven on the command line with "mvn spring-boot:run", then the static files reload fine whenever they are edited. How can I make intellij reload the static files automatically?
请先登录再写评论。
You can't yet, please see https://youtrack.jetbrains.com/issue/IDEA-140158 3.)
Ok those features looks pretty cool. By the way, the "Spring" run target currently works for spring boot projects, except the static files don't reload. Actually, I found a workaround, which is to just use a maven run target, and then it works the same as if I just did "mvn spring-boot:run"
Hmm - that workaround doesn't work for me when I do this from IDEA, however when I start the app via mvn spring-boot:run from the command line, it all works fine. IDEA 2016.
Nick, please make sure the folder containing the static resources is marked as "Resources Root".
Is that a Spring Boot setting, Maven Setting or IDEA setting ?
In IDEA 2016.1, all I can see is a "Content Root", or I can mark a folder as "Resources" however I can't see how to mark it as a "Resources Root".
Yes, please mark it as "Resources".
Yes. Definitely marked as Resources, and still not working.
Could you please provide a (minimal) sample project in our issue tracker? https://youtrack.jetbrains.com/issues/IDEA Thanks.
Thanks @yann Cebron. Created and attached here https://youtrack.jetbrains.com/issue/IDEA-153868
Hello Nick Pellow, can you fix that ? im now facing the same problem …
Hello,
Have you tried suggestion from YouTrack issue? Mentioned above? If it still doesn't work please provide sample project example in comments to it.