Grails 2.1.0 Not Auto-Reloading / Auto-Recompiling

前端 未结 4 1785
天涯浪人
天涯浪人 2021-02-15 23:24

Seems that Grails does automatically recompile my GSP pages, but not my controllers. It used to work with the previous version of Grails. Any idea what I can look for?

U

4条回答
  •  醉酒成梦
    2021-02-15 23:52

    Disclaimer: Auto-reload has always worked for me on my Mac.

    I've found a couple of things that might be useful.

    First, it appears that running a custom environment (that isn't dev) disables auto-reload (see this stackoverflow post), so you'll want to follow the directions in that post if you're running the application that way.

    Second, if you're running the app as a war, for sure auto-reload is turned off. (See the Grails Auto-Reload Page)

    Third, I've found that using a Grails IDE (such as IntelliJ or SpringSource) really adds a lot of stability to the Grails development environment. For example, IntelliJ doesn't use the Grails shell file that comes with the binary download. It manually invokes the Grails jars and bootstraps.

    My questions to you are:

    What does the rest of your environment look like? How are you running your application (run-app or another container)?

    What Grails plugins do you have installed (the Grails documentation says the tomcat plugin is configured for optimal auto-reloading)?

    Do you have any other Grails binaries downloaded on your computer (could cause confusion when it's trying to load)?

    And finally, are you able to reproduce this issue in a clean environment (meaning new Grails binary, fresh Grails create-app)?

    I'd also recommend reading the Deployment section of the Grails documentation (found here). It has some pertinent information regarding the reloading.

    I apologize for the longwinded and potentially non-answering answer, but I hope this has sparked an idea or two. Let me know how things turn out!

提交回复
热议问题