配置文件升级+修改(重要更新!)

This commit is contained in:
2025-06-09 09:22:59 +08:00
parent a548d8f3f2
commit d111c8c2c0
27 changed files with 1880 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using Nacos.AspNetCore.V2;
using System.Text.Json.Serialization;
using ZR.Admin.WebApi.AutoMapperProfile;
using ZR.Admin.WebApi.Extensions;
@@ -14,9 +15,12 @@ using ZR.Common.Cache;
using ZR.Common.MqttHelper;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
//配置中心
//builder.Configuration.AddNacosV2Configuration(builder.Configuration.GetSection("NacosConfig"));
//服务注册
//builder.Services.AddNacosAspNet(builder.Configuration);
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();