| | |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using Autofac; |
| | | using Autofac.Core; |
| | | using Autofac.Extensions.DependencyInjection; |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | using Newtonsoft.Json.Serialization; |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using WIDESEA_Core; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Authorization; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | |
| | | using WIDESEAWCS_QuartzJob.Seed; |
| | | using WIDESEAWCS_Server.Filter; |
| | | using WIDESEAWCS_Server.HostedService; |
| | | using WIDESEAWCS_Tasks.SocketServer; |
| | | using WIDESEAWCS_WCSServer.Filter; |
| | | |
| | | var builder = WebApplication.CreateBuilder(args); |
| | |
| | | builder.Services.AddHttpContextSetup(); |
| | | |
| | | builder.Services.AddHostedService<QuartzJobHostedService>();//任务调度 启动服务 |
| | | builder.Services.AddSingleton<TcpSocketServer>(); |
| | | builder.Services.AddHostedService<SocketServerHostedService>(); |
| | | |
| | | builder.Services.AddMvc(options => |
| | | { |
| | |
| | | options.Filters.Add(typeof(CustomAuthorizeFilter)); |
| | | }); |
| | | |
| | | builder.Services.AddScoped<HttpClientHelper>(); |
| | | |
| | | builder.Services.AddAuthorizationSetup(); |
| | | |
| | | builder.Services.AddIpPolicyRateLimitSetup(builder.Configuration);//IPLimit限流 启动服务 |