Open Closed

Override abp/application-configuration api #3235


User avatar
0
arbasu@microsoft.com created
  • ABP Framework version: v4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no (Angular -identity server separate)
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

During initial load the api /abp/application-configuration takes a lot of time. I am considering to introduce overall cache with key includes the _currentUser.Id

Just wondering which call needs to be overridden and if the above approach will work.

I can see some article referring to override this call (in the ink below) but my guess is this more for mvc application , hence require suggestion/support. https://github.com/abpframework/abp/blob/8371b74839be57c955d7b6199d1ee10422e4cd26/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs#L69


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Create a class and inherit the AbpApplicationConfigurationAppService then override the methods.

    [ExposeServices(typeof(IAbpApplicationConfigurationAppService), typeof(AbpApplicationConfigurationAppServiceApplicationService))]
    public class MyAbpApplicationConfigurationAppService : AbpApplicationConfigurationAppService
    
  • User Avatar
    0
    arbasu@microsoft.com created

    hi

    Create a class and inherit the AbpApplicationConfigurationAppService then override the methods.

    [ExposeServices(typeof(IAbpApplicationConfigurationAppService), typeof(AbpApplicationConfigurationAppServiceApplicationService))] 
    public class MyAbpApplicationConfigurationAppService : AbpApplicationConfigurationAppService 
    

    which namespace and nuget package Do I need to include? as I am unable to find the references?

  • User Avatar
    0
    arbasu@microsoft.com created

    Let me know which nuget package and namespace reference is needed..as I am unable to resolve

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Package :Volo.Abp.AspNetCore.Mvc/ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs#L24

    Customizing the Application Modules: Overriding Services

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

  • User Avatar
    0
    arbasu@microsoft.com created

    Volo.Abp.AspNetCore.Mvc

    I don't see the nuget package .... what am I doing wrong?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Your project already includes this.

    https://www.nuget.org/packages/Volo.Abp.AspNetCore.Mvc/

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11