|
|
|
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.AspNetCore.Localization;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
using Swashbuckle.AspNetCore.Swagger;
|
|
|
|
|
using Volo.Abp;
|
|
|
|
@ -144,26 +145,19 @@ namespace Volo.BloggingTestApp
|
|
|
|
|
|
|
|
|
|
app.UseVirtualFiles();
|
|
|
|
|
|
|
|
|
|
app.UseSwagger();
|
|
|
|
|
app.UseSwaggerUI(options =>
|
|
|
|
|
{
|
|
|
|
|
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
|
|
|
|
|
});
|
|
|
|
|
app.UseRouting();
|
|
|
|
|
|
|
|
|
|
//app.UseSwagger();
|
|
|
|
|
//app.UseSwaggerUI(options =>
|
|
|
|
|
//{
|
|
|
|
|
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
app.UseAuthentication();
|
|
|
|
|
|
|
|
|
|
app.UseRequestLocalization(app.ApplicationServices.GetRequiredService<IOptions<RequestLocalizationOptions>>().Value);
|
|
|
|
|
|
|
|
|
|
app.UseMvc(routes =>
|
|
|
|
|
{
|
|
|
|
|
routes.MapRoute(
|
|
|
|
|
name: "defaultWithArea",
|
|
|
|
|
template: "{area}/{controller=Home}/{action=Index}/{id?}");
|
|
|
|
|
|
|
|
|
|
routes.MapRoute(
|
|
|
|
|
name: "default",
|
|
|
|
|
template: "{controller=Home}/{action=Index}/{id?}");
|
|
|
|
|
});
|
|
|
|
|
app.UseMvcWithDefaultRouteAndArea();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using (var scope = context.ServiceProvider.CreateScope())
|
|
|
|
|