use of com.alipay.sofa.runtime.api.client.ServiceClient in project sofa-boot by sofastack.
the class SwaggerServiceApplicationListener method onApplicationEvent.
@Override
public void onApplicationEvent(ApplicationStartedEvent event) {
List<BindingParam> bindingParams = new ArrayList<>();
bindingParams.add(new RestBindingParam());
ServiceParam serviceParam = new ServiceParam();
serviceParam.setInterfaceType(SwaggerService.class);
serviceParam.setInstance(new SwaggerServiceImpl());
serviceParam.setBindingParams(bindingParams);
ServiceClient serviceClient = clientFactory.getClient(ServiceClient.class);
serviceClient.service(serviceParam);
}
Aggregations