| | |
| | | using Microsoft.OpenApi.Models; |
| | | using MES.Service.Dto.@base; |
| | | using MES.Service.util; |
| | | using Microsoft.OpenApi.Models; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Serialization; |
| | | using Swashbuckle.AspNetCore.SwaggerUI; |
| | |
| | | public Startup(IConfiguration configuration) |
| | | { |
| | | Configuration = configuration; |
| | | |
| | | new AppsettingsUtility().Initial(configuration); |
| | | } |
| | | |
| | | public IConfiguration Configuration { get; } |
| | |
| | | public void ConfigureServices(IServiceCollection services) |
| | | { |
| | | services.AddControllers(); |
| | | |
| | | // 读取 系统 设置并注入到服务中 |
| | | services.Configure<AppSettings>( |
| | | Configuration.GetSection("AppSettings")); |
| | | |
| | | services.AddSwaggerGen(c => |
| | | { |
| | | c.SwaggerDoc("v1", |