commit | c2e91756f0e3970c9f7528c4257b015c0d7f1ac2 | [log] [tgz] |
---|---|---|
author | Han Gao <dhangao@hotmail.com> | Thu May 12 19:38:21 2022 +0800 |
committer | GitHub <noreply@github.com> | Thu May 12 19:38:21 2022 +0800 |
tree | 64bdaa54afc5705be9363dae26afa88b27e6e758 | |
parent | bf11ea0732b491ded0654c89af71cd6a5a48abdb [diff] |
support register client via zookeeper (#9)
For ASP.NET Core project, we can refer to the example code at examples/AspNetCoreExample
. What you need to do is quite simple and straightforward.
First, add the Shenyu ASP.NET Core dependency into project.
dotnet add package <todo>
Then, in Startup.ConfigureServices
method, add the ShenyuRegister
service.
public void ConfigureServices(IServiceCollection services) { ... services.AddShenyuRegister(this.Configuration); ... }
Finnaly, set your Shenyu
configurations in appsettings.json
.
{ "Shenyu": { "Register": { "ServerList": "http://localhost:9095", "UserName": "<your_admin_user>", "Password": "<your_admin_password>" }, "Client": { "AppName": "dotnet-example", "ContextPath": "/dotnet", "IsFull": false, "ClientType": "http" } } }
That's all! After finished above steps, you can just start your project and you can visit shenyu-admin
portal to see the APIs have been registered in Shenyu.