我在Redisson中使用了以下可调用任务。
public static class CallableTask implements Callable<String> {
@RInject
RedissonClient redisson;
@Autowired
MyService myService;
@Override
public String call() throws Exception {
myService.executr();
}
}
我使用
提交任务 RedissonClient redisson = Redisson.create();
RExecutorService executor = redisson.getExecutorService("myExecutor1");
executor.myExecutor.schedule(new CallableTask(), 60, TimeUnit.SECONDS);
执行此任务的工作程序节点将能够获得注入的Spring myService吗?