FalconSSO/FAuth/Controllers/api/ApiControllerBase.cs

28 lines
915 B
C#

using System;
using FAuth.Extensions;
using FAuth.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace FAuth.Controllers.api
{
/// <summary>
/// api控制器基类
/// </summary>
[Area("api")]
//[ApiController]
[Route("api/[Controller]/[Action]")]
[ServiceFilter(typeof(ApiExceptionFilterAttribute))]
[ProducesResponseType(typeof(ApiErrorResult),500)]
[ProducesResponseType(typeof(ApiErrorResult),400)]
public abstract class ApiControllerBase<LoggerType>:ControllerBase<LoggerType>
{
public ApiControllerBase(ILogger<LoggerType> logger,IServiceProvider service) : base(logger,service) {
}
//public override Task OnActionExecutionAsync(ActionExecutingContext context,ActionExecutionDelegate next) {
// return base.OnActionExecutionAsync(context,next);
//}
}
}