commit | bcb44df32205cd6afab6a97cb8a350f1a574dd1f | [log] [tgz] |
---|---|---|
author | Han Gao <dhangao@hotmail.com> | Sat May 14 17:18:32 2022 +0800 |
committer | GitHub <noreply@github.com> | Sat May 14 17:18:32 2022 +0800 |
tree | a232bd5cd0953216f8977641a1f610aea50ad268 | |
parent | c2e91756f0e3970c9f7528c4257b015c0d7f1ac2 [diff] |
adding .editorconfig to enforce consistent coding styles (#7)
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.