1.05 #7

Merged
zzh merged 19 commits from test into master 2026-10-15 13:59:09 +08:00
2 changed files with 6 additions and 7 deletions
Showing only changes of commit 38d36eb812 - Show all commits

View File

@ -4,6 +4,6 @@
<PropertyGroup> <PropertyGroup>
<!-- All Fake packages --> <!-- All Fake packages -->
<!-- 清本地nuget缓存:dotnet nuget locals -c http-cache --> <!-- 清本地nuget缓存:dotnet nuget locals -c http-cache -->
<FakePackageVersion>8.0.5.24</FakePackageVersion> <FakePackageVersion>8.0.5.26</FakePackageVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -184,12 +184,9 @@ public class SimpleAdminApiModule : FakeModule
// 静态文件服务(用于头像等上传文件) // 静态文件服务(用于头像等上传文件)
app.UseStaticFiles(); app.UseStaticFiles();
// 路由 - 必须在认证和授权之前 // 路由 - 必须在认证和授权之前;且必须在 UsePathBase 之后
app.UseRouting(); app.UseRouting();
// EventBus Dashboard:必须在 UsePathBase 之后,否则 /admin/eventbus 会 404
app.UseFakeEventBusDashboard();
// OpenAPI 验签需读取原始 Body,允许二次读流 // OpenAPI 验签需读取原始 Body,允许二次读流
app.Use(async (ctx, next) => app.Use(async (ctx, next) =>
{ {
@ -208,8 +205,10 @@ public class SimpleAdminApiModule : FakeModule
// 角色/菜单写操作后失效登录用户信息缓存 // 角色/菜单写操作后失效登录用户信息缓存
app.UseMiddleware<RbacCacheInvalidationMiddleware>(); app.UseMiddleware<RbacCacheInvalidationMiddleware>();
// 端点映射 // 端点映射(Dashboard 用 MapGroup,依赖 PathBase 已剥离前缀)
app.MapControllers(); app.MapControllers();
// 必须在 UsePathBase 之后:完整对外路径为 /admin/eventbus
app.UseFakeEventBusDashboard();
app.Services.GetRequiredService<IFeiShuNotificationService>().Send("Application started"); app.Services.GetRequiredService<IFeiShuNotificationService>().Send("Application started");
} }