chore: 升级依赖并优化种子
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"App": {
|
||||
"Seed": {
|
||||
"Enabled": true,
|
||||
"Enabled": false,
|
||||
"DefaultTenant": {
|
||||
"TenantId": 1000000000001,
|
||||
"Code": "demo",
|
||||
@@ -39,6 +39,7 @@
|
||||
},
|
||||
"Identity": {
|
||||
"AdminSeed": {
|
||||
"Enabled": false,
|
||||
"RoleTemplates": [
|
||||
{
|
||||
"TemplateCode": "platform-admin",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using FluentValidation;
|
||||
using Microsoft.AspNetCore.Cors.Infrastructure;
|
||||
using Microsoft.Extensions.Caching.StackExchangeRedis;
|
||||
using OpenTelemetry.Metrics;
|
||||
using OpenTelemetry.Resources;
|
||||
using OpenTelemetry.Trace;
|
||||
@@ -14,6 +16,7 @@ using TakeoutSaaS.Shared.Abstractions.Ids;
|
||||
using TakeoutSaaS.Shared.Kernel.Ids;
|
||||
using TakeoutSaaS.Shared.Web.Extensions;
|
||||
using TakeoutSaaS.Shared.Web.Swagger;
|
||||
using System.Reflection;
|
||||
|
||||
// 1. 创建构建器与日志模板
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
@@ -43,6 +46,14 @@ builder.Services.AddSharedSwagger(options =>
|
||||
options.Description = "小程序 API 文档";
|
||||
options.EnableAuthorization = true;
|
||||
});
|
||||
builder.Services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
|
||||
|
||||
// 4. 注册 Redis 分布式缓存,供验证码等功能使用
|
||||
var redisConnection = builder.Configuration.GetValue<string>("Redis");
|
||||
builder.Services.AddStackExchangeRedisCache(options =>
|
||||
{
|
||||
options.Configuration = redisConnection;
|
||||
});
|
||||
|
||||
// 4. 注册多租户与业务模块
|
||||
builder.Services.AddTenantResolution(builder.Configuration);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user