How to tell intelliJ IDEA to update my classes and resources in a grails application?

Customization: I have a Grails project in IntelliJ Idea. I launched the application by clicking the “Play” button at the top, where I have a grails configuration with the default grails run-app command. Everything is good there.

Problem: When I make changes to gsp, controller, css, js or any other file. If I click the refresh button in the browser (Control + F5), the changes will not be reflected. I have to stop / restart. It slows me down.

What I've done:

  • I also tried setting up Tomcat's configuration and starting it, as the web archive exploded, but it still does not work for grails applications. However, it worked for my other Spring / Hibernate web applications.
  • I also tried using the STS IDE, and classes and resources are updated when I make changes.

Does anyone know how to tell IntelliJ IDEA update classes and resources for a Grails application?

+8
intellij-idea grails
source share
3 answers

If you start the grails application using the grails dev run-app, the application will not restart. So, just launch the application using grails run-app.

+1
source share

According to the Grails Final Book Guide on page 34, it says that a hot reboot is only available when working in dev mode. Thanks to Nate (my colleague) for pointing this out.

So, the moral of this story is that when you are ready to deploy your model in a real physical database, put the database settings in the "Development" section not in the testing section. That is, if you want a hot reboot, of course, for quick development.

+3
source share

As a workaround, you can copy $ GRAILS_HOME / lib / org.springsource.springloaded / springloaded-core / jars / springloaded-core - *. jar in $ GRAILS_HOME / lib / com.springsource.springloaded / springloaded-core / jars / spring-core -. * jar

Problem - IDEA-98131

0
source share

All Articles