问题
It looks like IntelliJ's (Ultimate EAP 15) support for Grails 3 is in the early stages yet. If I do Run -> Debug 'Grails:My App'
, I'm able to launch an app from inside IntelliJ, I can set breakpoints and it works as expected.
If I make changes however, I see in the console that the file is recompiled, but when I hit reload in the browser, I don't see the changes reflected there. I have to stop and restart the app in IntelliJ before I see them. Anyone know how I can get the auto-reloading working?
回答1:
After chasing this for a week, this post finally provided an explanation.
It's actually a Grails issue, not a problem with IntelliJ's Grails integration: spaces in a file's path will break automatic reloading. Renaming my project from Grails Demo
to GrailsDemo
got everything straighted out. (Storing a project in a folder like My Documents
will also cause trouble.) The post's author indicates that this started with version 2.4.4 and it's still happening for me in 3.0.4.
来源:https://stackoverflow.com/questions/32995707/launch-grails-3-app-from-intellij-w-auto-reloading-enabled