fix 聚合swagger
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.Middleware;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddJsonFile("ocelot.json", true, true);
|
||||
// Add services to the container.
|
||||
using Gateway;
|
||||
|
||||
builder.Services.AddOcelot();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
app.UseOcelot().Wait();
|
||||
|
||||
app.Run();
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureAppConfiguration(builder =>
|
||||
{
|
||||
builder.AddJsonFile("ocelot.json", true, true);
|
||||
})
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
})
|
||||
.Build().Run();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user