Grails 3.0.1 - how to configure grails.gorm.defaul

2019-02-22 22:59发布

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.

1条回答
何必那么认真
2楼-- · 2019-02-22 23:16

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

查看更多
登录 后发表回答