Browse Source
Merge pull request #17626 from abpframework/issue-17625
Do not remove Integration postfix for auto controllers for integration services
pull/17635/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs
-
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs
-
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/ApplicationService.cs
|
|
@ -20,6 +20,8 @@ public class AbpConventionalControllerOptions |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public bool UseV3UrlStyle { get; set; } |
|
|
public bool UseV3UrlStyle { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
public string[] IgnoredUrlSuffixesInControllerNames { get; set; } = new[] { "Integration" }; |
|
|
|
|
|
|
|
|
public AbpConventionalControllerOptions() |
|
|
public AbpConventionalControllerOptions() |
|
|
{ |
|
|
{ |
|
|
ConventionalControllerSettings = new ConventionalControllerSettingList(); |
|
|
ConventionalControllerSettings = new ConventionalControllerSettingList(); |
|
|
|
|
|
@ -109,7 +109,7 @@ public class ConventionalRouteBuilder : IConventionalRouteBuilder, ITransientDep |
|
|
{ |
|
|
{ |
|
|
if (configuration?.UrlControllerNameNormalizer == null) |
|
|
if (configuration?.UrlControllerNameNormalizer == null) |
|
|
{ |
|
|
{ |
|
|
return controllerName; |
|
|
return controllerName.RemovePostFix(Options.IgnoredUrlSuffixesInControllerNames); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return configuration.UrlControllerNameNormalizer( |
|
|
return configuration.UrlControllerNameNormalizer( |
|
|
|
|
|
@ -40,7 +40,7 @@ public abstract class ApplicationService : |
|
|
[Obsolete("Use LazyServiceProvider instead.")] |
|
|
[Obsolete("Use LazyServiceProvider instead.")] |
|
|
public IServiceProvider ServiceProvider { get; set; } = default!; |
|
|
public IServiceProvider ServiceProvider { get; set; } = default!; |
|
|
|
|
|
|
|
|
public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "IntService", "IntegrationService", "Service" }; |
|
|
public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "Service" }; |
|
|
|
|
|
|
|
|
public List<string> AppliedCrossCuttingConcerns { get; } = new(); |
|
|
public List<string> AppliedCrossCuttingConcerns { get; } = new(); |
|
|
|
|
|
|
|
|
|