- ABP Framework version: 5.2.1
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
Hi I tried to override some methods in AbpApplicationConfigurationAppService class as follow:
public class CustomApplicationConfigurationAppService :
AbpApplicationConfigurationAppService
{
public CustomApplicationConfigurationAppService(
IOptions<AbpLocalizationOptions> localizationOptions,
IOptions<AbpMultiTenancyOptions> multiTenancyOptions,
IServiceProvider serviceProvider,
IAbpAuthorizationPolicyProvider abpAuthorizationPolicyProvider,
IPermissionDefinitionManager permissionDefinitionManager,
DefaultAuthorizationPolicyProvider defaultAuthorizationPolicyProvider,
IPermissionChecker permissionChecker,
IAuthorizationService authorizationService,
ICurrentUser currentUser,
ISettingProvider settingProvider,
ISettingDefinitionManager settingDefinitionManager,
IFeatureDefinitionManager featureDefinitionManager,
ILanguageProvider languageProvider,
ITimezoneProvider timezoneProvider,
IOptions<AbpClockOptions> abpClockOptions,
ICachedObjectExtensionsDtoService cachedObjectExtensionsDtoService)
: base(localizationOptions, multiTenancyOptions, serviceProvider, abpAuthorizationPolicyProvider,
permissionDefinitionManager, defaultAuthorizationPolicyProvider, permissionChecker,
authorizationService,
currentUser, settingProvider, settingDefinitionManager, featureDefinitionManager, languageProvider,
timezoneProvider, abpClockOptions, cachedObjectExtensionsDtoService)
{
}
protected override async Task<ApplicationLocalizationConfigurationDto> GetLocalizationConfigAsync()
{
var localizationConfig = new ApplicationLocalizationConfigurationDto();
return localizationConfig;
}
}
Add replaced using traditional style in my ApplicationModule.cs : context.Services.Replace(ServiceDescriptor.Transient<IAbpApplicationConfigurationAppService, CustomApplicationConfigurationAppService>());
when I GET /api/abp/application-configuration from swagger, the result is as expected and localization is empty: but when launching web project, the response from GET request to /Abp/ApplicationConfigurationScript contains all localization data:
Why is this happening? And what is the solution?
4 Answer(s)
-
0
Hi,
I can reproduce the problem, can you create a new project to reproduce and send it to me by email? shiwei.liang@volosoft.com Thanks.
-
0
Hi,
I can reproduce the problem, can you create a new project to reproduce and send it to me by email? shiwei.liang@volosoft.com Thanks.
Hi. I sent the requested sample to your email address. Thanks.
-
2
-
0
Hi, Thanks. That solved the problem.