记录一下一些坑html
Grails3.2-
版能够直接在domain
中注入service
,在Grails3.2+
中默认关闭了自动注入功能在
application.groovy
中配置全局映射,若没有此脚本需新建app
grails.gorm.default.mapping = {
autowire true
}
复制代码
在须要注入
bean
的domain
中添加映射dom
static mapping = {
autowire true
}
复制代码
在
application.yml
中新增或修改配置spa
---
grails:
gorm:
autowire: true
复制代码