Search code examples
grailsgrails-ormgrails-3.0

Grails 3.0.1 - how to configure grails.gorm.default.constraints in application.yml


I took the old configuration:

grails.gorm.default.constraints = {
    '*' (nullable: true, blank: true)
}

... and put it in the application.groovy.

Luckily it worked as expected.

How would one define this in application.yml? I tried:

grails:
    gorm:
        default:
            constraints:
                '*' (nullable: true, blank: true)

but this gives errors on start.


Solution

  • application.groovy is the place to do that. Groovy code in a .yml config file is invalid and not supported.