diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs index 0e210dd8de..c1e1e6be25 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs @@ -4,6 +4,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Identity; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.Account { @@ -13,6 +14,14 @@ namespace Volo.Abp.Account typeof(AbpAspNetCoreMvcModule))] public class AbpAccountHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpAccountHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs index 46e2603a77..3365063299 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo/Blogging/BloggingHttpApiModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Blogging.Localization; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Blogging { @@ -11,6 +12,13 @@ namespace Volo.Blogging typeof(AbpAspNetCoreMvcModule))] public class BloggingHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BloggingHttpApiModule).Assembly); + }); + } public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/DocsAdminHttpApiModule.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/DocsAdminHttpApiModule.cs index 6efc9123dc..ed62f35e6f 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/DocsAdminHttpApiModule.cs +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo/Docs/Admin/DocsAdminHttpApiModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Docs.Localization; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Docs.Admin { @@ -12,6 +13,13 @@ namespace Volo.Docs.Admin )] public class DocsAdminHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DocsAdminHttpApiModule).Assembly); + }); + } public override void ConfigureServices(ServiceConfigurationContext context) { diff --git a/modules/docs/src/Volo.Docs.HttpApi/Volo/Docs/DocsHttpApiModule.cs b/modules/docs/src/Volo.Docs.HttpApi/Volo/Docs/DocsHttpApiModule.cs index 0d700576be..28b35f3182 100644 --- a/modules/docs/src/Volo.Docs.HttpApi/Volo/Docs/DocsHttpApiModule.cs +++ b/modules/docs/src/Volo.Docs.HttpApi/Volo/Docs/DocsHttpApiModule.cs @@ -1,5 +1,6 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Docs { @@ -9,6 +10,12 @@ namespace Volo.Docs )] public class DocsHttpApiModule : AbpModule { - + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(DocsHttpApiModule).Assembly); + }); + } } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiModule.cs index d7761f7930..5146061c3b 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/AbpFeatureManagementHttpApiModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.FeatureManagement.Localization; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.FeatureManagement { @@ -11,6 +12,14 @@ namespace Volo.Abp.FeatureManagement typeof(AbpAspNetCoreMvcModule))] public class AbpFeatureManagementHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpFeatureManagementHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiModule.cs index 9f8c69be1e..6e1b377d02 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo/Abp/PermissionManagement/AbpPermissionManagementHttpApiModule.cs @@ -3,6 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.Localization; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.PermissionManagement.HttpApi { @@ -12,6 +13,14 @@ namespace Volo.Abp.PermissionManagement.HttpApi )] public class AbpPermissionManagementHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpPermissionManagementHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiModule.cs index 7f7e674761..e5e3bbaaaf 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiModule.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/AbpTenantManagementHttpApiModule.cs @@ -5,6 +5,7 @@ using Volo.Abp.FeatureManagement.Localization; using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.TenantManagement.Localization; +using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.TenantManagement { @@ -15,6 +16,14 @@ namespace Volo.Abp.TenantManagement )] public class AbpTenantManagementHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpTenantManagementHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/BookManagementHttpApiModule.cs b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/BookManagementHttpApiModule.cs index d503eec6e0..6a3014e494 100644 --- a/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/BookManagementHttpApiModule.cs +++ b/samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/BookManagementHttpApiModule.cs @@ -3,6 +3,7 @@ using Acme.BookStore.BookManagement.Localization; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace Acme.BookStore.BookManagement { @@ -11,6 +12,14 @@ namespace Acme.BookStore.BookManagement typeof(AbpAspNetCoreMvcModule))] public class BookManagementHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(BookManagementHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options => diff --git a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement/ProductManagementHttpApiModule.cs b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement/ProductManagementHttpApiModule.cs index 7f9fe7142c..2653f11758 100644 --- a/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement/ProductManagementHttpApiModule.cs +++ b/samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement/ProductManagementHttpApiModule.cs @@ -1,5 +1,6 @@ using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace ProductManagement { @@ -8,6 +9,12 @@ namespace ProductManagement typeof(AbpAspNetCoreMvcModule))] public class ProductManagementHttpApiModule : AbpModule { - + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(ProductManagementHttpApiModule).Assembly); + }); + } } } diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameHttpApiModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameHttpApiModule.cs index 28bb3eb1bf..11d7348806 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameHttpApiModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/MyProjectNameHttpApiModule.cs @@ -3,6 +3,7 @@ using MyCompanyName.MyProjectName.Localization; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; namespace MyCompanyName.MyProjectName { @@ -11,6 +12,14 @@ namespace MyCompanyName.MyProjectName typeof(AbpAspNetCoreMvcModule))] public class MyProjectNameHttpApiModule : AbpModule { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(MyProjectNameHttpApiModule).Assembly); + }); + } + public override void ConfigureServices(ServiceConfigurationContext context) { Configure(options =>