2015-02-24 131 views
0

我正在尝试使用@DelegateAsync并遇到一些问题。Grails @DelegateAsync和依赖注入

我的设置看起来非常像这样:

@DelegateAsync(SynchronousService) 
class AsyncService extends BaseService {} 

class SynchronousService extends BaseService {} 

abstract class BaseService { 
    def grailsApplication 
} 

似乎grailsApplication和其他豆类从不注入SynchronousService。他们应该是? AsyncService将我所期望的一切连接起来。

回答

0

看起来这可能做的伎俩,但现在我需要弄清楚为什么我打在GPars异步执行错误:

class AsyncService extends BaseService { 
    @DelegateAsync SynchronousService synchronousService 
}