We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想请教一个问题 服务提供者 地址有一个 List,这个我有办法拿到
我希望,我本次调用,我自己指定调用其中的一个 Instence
问,如何指定???
The text was updated successfully, but these errors were encountered:
可以看看 Endpoint参数
Sorry, something went wrong.
文档地址不对
https://servicecomb.apache.org/references/java-chassis/zh_CN/general-development/context.html#context-discoverytree
应该是这个: 案例: 使用 Context 和 DiscoveryTree 实现轮询调用一个微服务的所有实例
interface DateTimeSchemaWithContextInf { Date getDate(InvocationContext context, Date date); } @RpcReference(microserviceName = "springmvc", schemaId = "DateTimeSchema") private DateTimeSchemaWithContextInf dateTimeSchemaWithContextInf; // code slip for (String endpoint : enpoints) { InvocationContext invocationContext = new InvocationContext(); invocationContext.addLocalContext(LoadbalanceHandler.SERVICECOMB_SERVER_ENDPOINT, parseEndpoint(endpoint)); Date date = new Date(); TestMgr.check(date.getTime(), dateTimeSchemaWithContextInf.getDate(invocationContext, date).getTime()); } // code slip private Endpoint parseEndpoint(String endpointUri) throws Exception { URI formatUri = new URI(endpointUri); Transport transport = SCBEngine.getInstance().getTransportManager().findTransport(formatUri.getScheme()); return new Endpoint(transport, endpointUri); }
No branches or pull requests
我想请教一个问题
服务提供者 地址有一个 List,这个我有办法拿到
我希望,我本次调用,我自己指定调用其中的一个 Instence
问,如何指定???
The text was updated successfully, but these errors were encountered: