我在resources.groovy定义1种豆Grails的 - 如何在注入集成测试中resources.groovy定义豆
cachedbean(serviceImpl) {
}
在服务我使用这种方式
MyService{
static transactional = false
def cachedbean
myMeth(){
cachedbean.get("cacheKey")
}
}
该作品但是当我尝试使用集成测试进行测试时,我在'get
' cachedbean上得到了nullpointer
例外。 get
(“cacheKey”)。
它是如何工作的?
工作。谢谢。 – user1298426