|
|
|
@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using MyCompanyName.MyProjectName.MultiTenancy; |
|
|
|
using StackExchange.Redis; |
|
|
|
using Swashbuckle.AspNetCore.Swagger; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Account.Web; |
|
|
|
using Volo.Abp.AspNetCore.MultiTenancy; |
|
|
|
@ -15,12 +16,17 @@ using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Data; |
|
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
|
using Volo.Abp.EntityFrameworkCore.SqlServer; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Volo.Abp.Identity.EntityFrameworkCore; |
|
|
|
using Volo.Abp.IdentityServer.EntityFrameworkCore; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.PermissionManagement; |
|
|
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.PermissionManagement.HttpApi; |
|
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.TenantManagement; |
|
|
|
using Volo.Abp.TenantManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
using Volo.Abp.Ui.Navigation.Urls; |
|
|
|
|
|
|
|
@ -35,9 +41,17 @@ namespace MyCompanyName.MyProjectName |
|
|
|
typeof(AbpAutofacModule), |
|
|
|
typeof(AbpEntityFrameworkCoreSqlServerModule), |
|
|
|
typeof(AbpIdentityEntityFrameworkCoreModule), |
|
|
|
typeof(AbpIdentityApplicationModule), |
|
|
|
typeof(AbpIdentityHttpApiModule), |
|
|
|
typeof(AbpIdentityServerEntityFrameworkCoreModule), |
|
|
|
typeof(AbpPermissionManagementEntityFrameworkCoreModule), |
|
|
|
typeof(AbpSettingManagementEntityFrameworkCoreModule) |
|
|
|
typeof(AbpPermissionManagementApplicationModule), |
|
|
|
typeof(AbpPermissionManagementHttpApiModule), |
|
|
|
typeof(AbpSettingManagementEntityFrameworkCoreModule), |
|
|
|
typeof(AbpTenantManagementEntityFrameworkCoreModule), |
|
|
|
typeof(AbpTenantManagementApplicationModule), |
|
|
|
typeof(AbpTenantManagementHttpApiModule), |
|
|
|
typeof(MyProjectNameApplicationContractsModule) |
|
|
|
)] |
|
|
|
public class MyProjectNameIdentityServerModule : AbpModule |
|
|
|
{ |
|
|
|
@ -51,6 +65,14 @@ namespace MyCompanyName.MyProjectName |
|
|
|
options.UseSqlServer(); |
|
|
|
}); |
|
|
|
|
|
|
|
context.Services.AddSwaggerGen( |
|
|
|
options => |
|
|
|
{ |
|
|
|
options.SwaggerDoc("v1", new Info { Title = "MyProjectName API", Version = "v1" }); |
|
|
|
options.DocInclusionPredicate((docName, description) => true); |
|
|
|
options.CustomSchemaIds(type => type.FullName); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpLocalizationOptions>(options => |
|
|
|
{ |
|
|
|
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|
|
|
@ -97,6 +119,11 @@ namespace MyCompanyName.MyProjectName |
|
|
|
} |
|
|
|
app.UseIdentityServer(); |
|
|
|
app.UseAbpRequestLocalization(); |
|
|
|
app.UseSwagger(); |
|
|
|
app.UseSwaggerUI(options => |
|
|
|
{ |
|
|
|
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API"); |
|
|
|
}); |
|
|
|
app.UseAuditing(); |
|
|
|
app.UseMvcWithDefaultRouteAndArea(); |
|
|
|
|
|
|
|
|