我正在尝试使用 @DelegateAsync 并遇到一些问题。
我的设置看起来很像这样:
@DelegateAsync(SynchronousService)
class AsyncService extends BaseService {}
class SynchronousService extends BaseService {}
abstract class BaseService {
def grailsApplication
}
似乎 grailsApplication 和其他 bean 从未注入(inject)到 SynchronousService 中。他们应该是吗? AsyncService 已按照我的预期将所有东西都连接起来。
最佳答案
看起来这可能会奏效,但现在我需要弄清楚为什么我会在 GPars 中遇到异步执行错误:
class AsyncService extends BaseService {
@DelegateAsync SynchronousService synchronousService
}
关于spring - Grails @DelegateAsync 和依赖注入(inject),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28703565/