commit | 8cde764acfa1f064217822336b8a48d63d7e8ee6 | [log] [tgz] |
---|---|---|
author | Han Gao <dhangao@hotmail.com> | Tue Apr 19 11:19:34 2022 +0800 |
committer | GitHub <noreply@github.com> | Tue Apr 19 11:19:34 2022 +0800 |
tree | 3902a89477c9abe1188da96a67f7e732ee135468 | |
parent | 3f90e15a33a3263c8bb45e194accf451814aaa1f [diff] |
add client, asp.net core package and an example (#1) * add client, asp.net core package and an example * add apache 2.0 license and remove .editorconfig file
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.