![](/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.