Tags


Popular Grails Posts

Sometimes after upgrading the version of Intelli-J that I'm using for development, when I try to run the command-line `grails` program, I receive the following error message: Error occurred runni...
It used to be that when using the Spring Security Plugin with Grails, you needed to include in your build.gradle file a separate plugin for handling CORS requests. In more recent versions of Grails, t...
1. Right-click on the root of your Grails project and select "Add Framework Support". 2. Select "Groovy". 3. The dropdown menu next to "Use library" will allow you to choose a Grails library. 4. If th...
A convenient method of configuring parameters in a Grails app *application.yml* file is to use system environment variables instead of hard-coding values. The syntax for an environment variable is: ...
It's often useful when debugging a Grails application to be able to see the exact SQL that is being executed in the database. If you're using GORM, you can modify your /grails-app/conf/application.y...
Gradle provides the ability to customize the name of the WAR file that is generated from the Grails war command. Grails uses the war gradle plugin, which specifies the following pattern to create the...
By default, the grails `run-app` command, as well as running a Grails WAR from the terminal or as a Windows service, creates an instance of Tomcat on port 8080. To change this, edit the */grails-app/c...
Grails domain classes using GORM offer the dynamic finders `Class.findByXXX()` and `Class.findAllByXXX(max: 123)`, which will retrieve 1 record and 123 records, respectively. On SQL Server 2012 or h...
If you've obtained a JAR file that is not available in an existing Maven repository, you can add it to your local Maven repository with the following command. Make sure that all of your options are su...
Sometimes you have a segment of code that you want to kill if it runs any longer than a specified time period, for example a database query, external API call, or other type of long-running request. ...