commit | 3d122b30cb1030976d6883089363421b67cb6756 | [log] [tgz] |
---|---|---|
author | Han Gao <dhangao@hotmail.com> | Sat May 14 17:18:49 2022 +0800 |
committer | GitHub <noreply@github.com> | Sat May 14 17:18:49 2022 +0800 |
tree | 58cc6da6efd3af0749653c7e145c730134a43787 | |
parent | bcb44df32205cd6afab6a97cb8a350f1a574dd1f [diff] |
Add source code repository in project file (#11)
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.