Grails 3.0.1 - 如何在application.yml中配置grails.gorm.default.constraints [英] Grails 3.0.1 - how to configure grails.gorm.default.constraints in application.yml
问题描述
我采用了旧配置:
grails.gorm.default.constraints = {
'*'( nullable:true,blank:true)
}
...并放入 application.groovy
。
幸运的是,它按预期工作。
如何在 application.yml
中定义它?我试过:
grails:
gorm:
默认值:
约束:
'*'(可为空,true,空白:真)
但是这会给出错误。 / p>
I took the old configuration: ... and put it in the Luckily it worked as expected. How would one define this in but this gives errors on start. 这篇关于Grails 3.0.1 - 如何在application.yml中配置grails.gorm.default.constraints的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! .yml
配置文件中的代码无效且不受支持。 grails.gorm.default.constraints = {
'*' (nullable: true, blank: true)
}
application.groovy
.application.yml
? I tried:grails:
gorm:
default:
constraints:
'*' (nullable: true, blank: true)
application.groovy
is the place to do that. Groovy code in a .yml
config file is invalid and not supported.