public function resolveService(array $config)
    {
        $middleware = $this->gatherInvokerMiddleware(array_merge(
            $this->config['middleware'] ?? [],
            $config['middleware'] ?? []
        ));

        return (new ServiceComponent($this->app, $config))
            ->setContext($this->context)
            ->setDispatcher($this->dispatcher)
            ->setMiddleware($middleware)
            ->export();
    }