FalconSSO/FAuth/Controllers/api/ApiControllerBase.cs

28 lines
915 B
C#
Raw Normal View History

2020-03-30 16:10:51 +08:00
using System;
2020-04-13 08:35:54 +08:00
using FAuth.Extensions;
using FAuth.Models;
2020-03-30 16:10:51 +08:00
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)]
2020-03-30 16:10:51 +08:00
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);
//}
2020-03-30 16:10:51 +08:00
}
}