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...
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...
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...
When your application gets to be a certain size, you'll have to enter the world of Java Garbage Collection, and analyzing memory usage to better determine needs and improve performance. Part of that ...
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...
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. ...
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...
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: ...
By default, when a GORM `.save()` function call fails, it fails silently. If you want it to always throw an error, add this to your /grails-app/conf/application.yml file at the bottom. --- ...
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...