File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class Program
2727 services .AddDotNetCoreRpcClient ()
2828 // *通信基于HttpClientFactory,自行注册即可
2929 .AddHttpClient (" TestServer" , client => { client .BaseAddress = new Uri (" http://localhost:34047/" ); });
30+ // .AddHttpClient(TestServerName, client => { client.BaseAddress = new Uri("http://localhost:34047/Test.Server6"); });
3031
3132 IServiceProvider serviceProvider = services .BuildServiceProvider ();
3233 // *RpcClient使用这个类创建具体服务代理
@@ -136,6 +137,7 @@ public class Startup
136137 endpoint .Map (" /" , async context => await context .Response .WriteAsync (" server start!" ));
137138 // 通过endpoint的方式引入
138139 endpoint .MapDotNetCoreRpc ();
140+ // endpoint.MapDotNetCoreRpc("/Test.Server6");
139141 });
140142 }
141143}
@@ -159,6 +161,7 @@ builder.Services.AddSingleton<IPersonDal, PersonDal>()
159161 });
160162
161163app .UseDotNetCoreRpc ();
164+ // app.UseDotNetCoreRpc("/Test.Server6");
162165app .MapGet (" /" , () => " Hello World!" );
163166
164167app .Run ();
You can’t perform that action at this time.
0 commit comments