权限认证

This commit is contained in:
橙子
2022-04-06 22:22:45 +08:00
parent 5fcf5bd583
commit a6a2025972
13 changed files with 202 additions and 108 deletions

View File

@@ -12,7 +12,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
{
public static class CAPExtend
{
public static IServiceCollection AddCAPService<T>(this IServiceCollection services)
public static IServiceCollection AddCAPService(this IServiceCollection services)
{
if (Appsettings.appBool("CAP_Enabled"))
{
@@ -31,9 +31,9 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
x.FailedRetryInterval = 60;//second
x.FailedThresholdCallback = failed =>
{
var logger = failed.ServiceProvider.GetService<ILogger<T>>();
logger.LogError($@"MessageType {failed.MessageType} 失败了, 重试了 {x.FailedRetryCount} 次,
消息名称: {failed.Message.GetName()}");//do anything
//var logger = failed.ServiceProvider.GetService<ILogger<T>>();
//logger.LogError($@"MessageType {failed.MessageType} 失败了, 重试了 {x.FailedRetryCount} 次,
//消息名称: {failed.Message.GetName()}");//do anything
};
if (Appsettings.appBool("CAPDashboard_Enabled"))
{