| | |
| | | "OPTIONS") |
| | | ); |
| | | }); |
| | | |
| | | #region 接口行动过滤器 |
| | | services.AddControllers(options => { |
| | | options.Filters.Add(new ActionFilter()); |
| | | }); |
| | | var serviceProvider = services.BuildServiceProvider(); |
| | | ActionFilter.LoggerError = serviceProvider.GetRequiredService<ILogger<ActionFilter>>(); |
| | | #endregion |
| | | } |
| | | |
| | | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. |
| | |
| | | app.UseAuthorization(); |
| | | |
| | | app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); |
| | | |
| | | ////////////////////////// |
| | | |
| | | /////////////////////////// |
| | | |
| | | } |
| | | } |