![](/img/trans.png)
[英]Grails 3.0.1 - how and where to configure grails.gorm.default.mapping
[英]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:
default:
constraints:
'*' (nullable: true, blank: true)
但这会在开始时出错。
application.groovy
是这样做的地方。 .yml
配置文件中的Groovy代码无效且不受支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.