How to Inject spring bean in Connector

I am trying to configure a custom http-connector. It has a dependency on a spring managed bean i.e SecurityService. But couldnt able to inject the bean in my connector class i.e securityService bean is null. How can we implement this?

@Service
public class SecurityService extends SuperSecurityService {

public String getSecretToken() {
    return super.getSecretToken();
}

}

public class MyHttpConnector extends HttpConnectorImpl {

@Inject
private SecurityService securityService;

public MyHttpConnector() {
    super("MyHttpConnector");
}

@Override
public HttpResponse execute(HttpRequest httpRequest) {
    httpRequest.header("Authorization", securityService.getSecretToken());
    return super.execute(httpRequest);
}

Maybe you could post a small reproduction. Based on what I’m reading here in the docs, I think the process of registering your custom connector is a little more involved.