@@ -129,11 +129,11 @@ public <T> RpcfxInvocationHandler(Class<T> serviceClass, List<String> invokers,
129
129
public Object invoke (Object proxy , Method method , Object [] params ) throws Throwable {
130
130
131
131
List <String > urls = router .route (invokers );
132
- System .out .println ("router.route => " );
133
- urls .forEach (System .out ::println );
132
+ // System.out.println("router.route => ");
133
+ // urls.forEach(System.out::println);
134
134
String url = loadBalance .select (urls ); // router, loadbalance
135
- System .out .println ("loadBalance.select => " );
136
- System .out .println ("final => " + url );
135
+ // System.out.println("loadBalance.select => ");
136
+ // System.out.println("final => " + url);
137
137
138
138
if (url == null ) {
139
139
throw new RuntimeException ("No available providers from registry center." );
@@ -170,7 +170,7 @@ public Object invoke(Object proxy, Method method, Object[] params) throws Throwa
170
170
171
171
private RpcfxResponse post (RpcfxRequest req , String url ) throws IOException {
172
172
String reqJson = JSON .toJSONString (req );
173
- System .out .println ("req json: " +reqJson );
173
+ // System.out.println("req json: "+reqJson);
174
174
175
175
// 1.可以复用client
176
176
// 2.尝试使用httpclient或者netty client
@@ -180,7 +180,7 @@ private RpcfxResponse post(RpcfxRequest req, String url) throws IOException {
180
180
.post (RequestBody .create (JSONTYPE , reqJson ))
181
181
.build ();
182
182
String respJson = client .newCall (request ).execute ().body ().string ();
183
- System .out .println ("resp json: " +respJson );
183
+ // System.out.println("resp json: "+respJson);
184
184
return JSON .parseObject (respJson , RpcfxResponse .class );
185
185
}
186
186
}
0 commit comments