From 5867559502ead9431d7c8937f1156a2efdaac04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Tue, 7 Feb 2023 10:50:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E9=87=87=E7=94=A8=E5=BE=AE=E8=BD=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/SqlsugarExtensions.cs | 19 ++++++++----------- .../Yi.Framework.Core/Model/GobalLogModel.cs | 6 ------ .../YiFrameworkCoreModule.cs | 4 +--- .../Template/Yi.Template.Web/appsettings.json | 1 + .../project/rbac/Yi.RBAC.Web/appsettings.json | 1 + .../template/Yi.Template.Web/appsettings.json | 1 + 6 files changed, 12 insertions(+), 20 deletions(-) diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs index 12da5a19..8dfc8111 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarExtensions.cs @@ -95,19 +95,16 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions }; db.Aop.OnLogExecuting = (s, p) => { - if (GobalLogModel.SqlLogEnable) - { - var _logger = ServiceLocatorModel.Instance?.GetRequiredService>(); + var _logger = ServiceLocatorModel.Instance?.GetRequiredService>(); - StringBuilder sb = new StringBuilder(); - sb.Append("执行SQL:" + s.ToString()); - foreach (var i in p) - { - sb.Append($"\r\n参数:{i.ParameterName},参数值:{i.Value}"); - } - sb.Append($"\r\n 完整SQL:{UtilMethods.GetSqlString(DbType.MySql, s, p)}"); - _logger?.LogInformation(sb.ToString()); + StringBuilder sb = new StringBuilder(); + sb.Append("执行SQL:" + s.ToString()); + foreach (var i in p) + { + sb.Append($"\r\n参数:{i.ParameterName},参数值:{i.Value}"); } + sb.Append($"\r\n 完整SQL:{UtilMethods.GetSqlString(DbType.MySql, s, p)}"); + _logger?.LogDebug(sb.ToString()); }; }); diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Model/GobalLogModel.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Model/GobalLogModel.cs index 2474e386..b93b8a76 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Model/GobalLogModel.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Model/GobalLogModel.cs @@ -6,10 +6,4 @@ using System.Threading.Tasks; namespace Yi.Framework.Core.Model { - public class GobalLogModel - { - public static bool SqlLogEnable { get; set; } = true; - - public static bool LoginCodeEnable { get; set; } = true; - } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs index c284056d..6a6f3257 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs @@ -35,9 +35,7 @@ namespace Yi.Framework.Core services.AddAutoIocServer(); services.AddCurrentUserServer(); - //全局日志 - GobalLogModel.SqlLogEnable = Appsettings.appBool("SqlLog_Enable"); - GobalLogModel.LoginCodeEnable = Appsettings.appBool("LoginCode_Enable"); + } } } diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json index 35a27b42..ddf70ea3 100644 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json +++ b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json @@ -2,6 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", + //"Default": "Debug", "Microsoft.AspNetCore": "Warning" } }, diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/appsettings.json b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/appsettings.json index b1e87989..7bd04afc 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/appsettings.json +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/appsettings.json @@ -2,6 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", + //"Default": "Debug", "Microsoft.AspNetCore": "Warning" } }, diff --git a/Yi.Framework.Net6/src/project/template/Yi.Template.Web/appsettings.json b/Yi.Framework.Net6/src/project/template/Yi.Template.Web/appsettings.json index 35a27b42..ddf70ea3 100644 --- a/Yi.Framework.Net6/src/project/template/Yi.Template.Web/appsettings.json +++ b/Yi.Framework.Net6/src/project/template/Yi.Template.Web/appsettings.json @@ -2,6 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", + //"Default": "Debug", "Microsoft.AspNetCore": "Warning" } }, From 943a7344f6b995c683fdedde52279cfa641d3d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Thu, 9 Feb 2023 19:11:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?aspnetcore=E6=A8=A1=E5=9D=97=E8=BD=AC?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Builder/CurrentUserUseExtensions.cs} | 13 +++----- .../Builder}/ErrorHandExtensions.cs | 2 +- .../AspNetCore/Builder/SwaggerUseExtensons.cs | 16 ++++++---- .../CurrentUserAddExtensions.cs | 30 +++++++++++++++++++ .../Yi.Framework.AspNetCore.csproj | 4 +++ .../YiFrameworkAspNetCoreModule.cs | 26 ++++++++++++++++ .../Helper/AssemblyHelper.cs | 1 + .../Yi.Framework.Core/Helper/JsonHelper.cs | 15 ++++++++-- .../YiFrameworkCoreModule.cs | 4 +-- .../Services/CrudAppService.cs | 8 ++++- .../project/BBS/Yi.BBS.Web/YiBBSWebModule.cs | 2 ++ .../Yi.Template.Web/YiTemplateWebModule.cs | 2 ++ .../project/bbs/Yi.BBS.Web/YiBBSWebModule.cs | 2 ++ .../rbac/Yi.RBAC.Web/YiRBACWebModule.cs | 2 ++ .../Yi.Template.Web/YiTemplateWebModule.cs | 2 ++ 15 files changed, 108 insertions(+), 21 deletions(-) rename Yi.Framework.Net6/src/framework/{Yi.Framework.Core/Extensions/CurrentUserExtensions.cs => Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/CurrentUserUseExtensions.cs} (89%) rename Yi.Framework.Net6/src/framework/{Yi.Framework.Core/Extensions => Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder}/ErrorHandExtensions.cs (99%) create mode 100644 Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/CurrentUserAddExtensions.cs create mode 100644 Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/CurrentUserExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/CurrentUserUseExtensions.cs similarity index 89% rename from Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/CurrentUserExtensions.cs rename to Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/CurrentUserUseExtensions.cs index 9ea41d3f..f97c9fc0 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/CurrentUserExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/CurrentUserUseExtensions.cs @@ -12,23 +12,18 @@ using System.Threading.Tasks; using Yi.Framework.Core.Const; using Yi.Framework.Core.CurrentUsers; -namespace Yi.Framework.Core.Extensions +namespace Microsoft.AspNetCore.Builder { - public static class CurrentUserExtensions + public static class CurrentUserUseExtensions { - public static IServiceCollection AddCurrentUserServer(this IServiceCollection services) - { - return services.AddScoped(); - } - - public static IApplicationBuilder UseCurrentUserServer(this IApplicationBuilder app) { return app.UseMiddleware(); } - } + } + public class CurrentUserMiddleware { diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/ErrorHandExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ErrorHandExtensions.cs similarity index 99% rename from Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/ErrorHandExtensions.cs rename to Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ErrorHandExtensions.cs index 6421c847..50f0fbc9 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Extensions/ErrorHandExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/ErrorHandExtensions.cs @@ -9,7 +9,7 @@ using System.Text; using System.Threading.Tasks; using Yi.Framework.Core.Exceptions; -namespace Yi.Framework.Core.Extensions +namespace Microsoft.AspNetCore.Builder { internal class ExceptionModle diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerUseExtensons.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerUseExtensons.cs index 293100d9..cf37af7b 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerUseExtensons.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/AspNetCore/Builder/SwaggerUseExtensons.cs @@ -27,7 +27,8 @@ namespace AspNetCore.Microsoft.AspNetCore.Builder { foreach (var k in swaggerModels) { - c.SwaggerEndpoint(k.url, k.name); + + c.SwaggerEndpoint(k.Url, k.Name); } } @@ -38,12 +39,17 @@ namespace AspNetCore.Microsoft.AspNetCore.Builder } public class SwaggerModel { + public SwaggerModel(string name) + { + this.Name = name; + this.Url = "/swagger/v1/swagger.json"; + } public SwaggerModel(string url, string name) { - this.url = url; - this.name = name; + this.Url = url; + this.Name = name; } - public string url { get; set; } - public string name { get; set; } + public string Url { get; set; } + public string Name { get; set; } } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/CurrentUserAddExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/CurrentUserAddExtensions.cs new file mode 100644 index 00000000..801b8a48 --- /dev/null +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Microsoft/Extensions/DependencyInjection/CurrentUserAddExtensions.cs @@ -0,0 +1,30 @@ +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Text; +using System.Threading.Tasks; +using Yi.Framework.Core.Const; +using Yi.Framework.Core.CurrentUsers; + +namespace Microsoft.Extensions.DependencyInjection +{ + public static class CurrentUserAddExtensions + { + public static IServiceCollection AddCurrentUserServer(this IServiceCollection services) + { + return services.AddScoped(); + } + + + + } + + + +} diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj index 4c195f34..20d2b889 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/Yi.Framework.AspNetCore.csproj @@ -18,4 +18,8 @@ + + + + diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs new file mode 100644 index 00000000..4274dd1c --- /dev/null +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.AspNetCore/YiFrameworkAspNetCoreModule.cs @@ -0,0 +1,26 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using StartupModules; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Yi.Framework.AspNetCore +{ + public class YiFrameworkAspNetCoreModule : IStartupModule + { + + public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) + { + app.UseCurrentUserServer(); + } + + public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) + { + services.AddCurrentUserServer(); + } + } +} diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs index a8a70a0d..a1e9b0dc 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/AssemblyHelper.cs @@ -38,6 +38,7 @@ namespace Yi.Framework.Core.Helper return assembly.GetTypes().Where(m => m.IsClass && className == null ? true : m.Name == className && spaceName == null ? true : m.Namespace == spaceName + && !m.Name.StartsWith("<>") ).ToList(); } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/JsonHelper.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/JsonHelper.cs index 5b06a2ea..87e29171 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/JsonHelper.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/Helper/JsonHelper.cs @@ -1,4 +1,6 @@ -using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; using System.Collections.Generic; using System.Text.Json; @@ -6,7 +8,14 @@ namespace Yi.Framework.Core.Helper { public class JsonHelper { - + public static string ObjToStr(T obj, string dateTimeFormat) + { + IsoDateTimeConverter timeConverter = new IsoDateTimeConverter() + { + DateTimeFormat = dateTimeFormat + }; + return Newtonsoft.Json.JsonConvert.SerializeObject(obj, Formatting.Indented, timeConverter); + } public static string ObjToStr(T obj) { @@ -28,7 +37,7 @@ namespace Yi.Framework.Core.Helper string result = String.Empty; try { - JsonSerializer.Serialize(""); + System.Text.Json.JsonSerializer.Serialize(""); System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T)); using (System.IO.MemoryStream ms = new System.IO.MemoryStream()) diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs index 6a6f3257..6315a158 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core/YiFrameworkCoreModule.cs @@ -24,7 +24,7 @@ namespace Yi.Framework.Core //全局错误,需要靠前,放在此处无效 //app.UseErrorHandlingServer(); - app.UseCurrentUserServer(); + } public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) @@ -34,7 +34,7 @@ namespace Yi.Framework.Core //全盘扫描,自动依赖注入 services.AddAutoIocServer(); - services.AddCurrentUserServer(); + } } diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs index e7a1a7a1..e71b6b01 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Ddd/Services/CrudAppService.cs @@ -79,7 +79,13 @@ namespace Yi.Framework.Ddd.Services ReflexHelper.SetModelValue(nameof(IEntity.Id), SnowflakeHelper.NextId, entity); } } - + if (entity is IEntity entityForGuidId) + { + if (entityForGuidId.Id == Guid.Empty) + { + ReflexHelper.SetModelValue(nameof(IEntity.Id), new Guid(), entity); + } + } return Task.FromResult(entity); } diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/YiBBSWebModule.cs b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/YiBBSWebModule.cs index 2fbfc82f..d317c9e8 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/YiBBSWebModule.cs +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/YiBBSWebModule.cs @@ -8,10 +8,12 @@ using Yi.BBS.Sqlsugar; using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection; using Yi.Framework.Core.Autofac; using Yi.RBAC.Application; +using Yi.Framework.AspNetCore; namespace Yi.BBS.Web { [DependsOn( + typeof(YiFrameworkAspNetCoreModule), typeof(YiFrameworkCoreAutofacModule), typeof(YiBBSSqlsugarModule), typeof(YiBBSApplicationModule) diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs index c7623b63..5ba64864 100644 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs +++ b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs @@ -1,5 +1,6 @@ using AspNetCore.Microsoft.AspNetCore.Builder; using StartupModules; +using Yi.Framework.AspNetCore; using Yi.Framework.Auth.JwtBearer; using Yi.Framework.Core; using Yi.Framework.Core.Attributes; @@ -10,6 +11,7 @@ using Yi.Template.Sqlsugar; namespace Yi.Template.Web { [DependsOn( + typeof(YiFrameworkAspNetCoreModule), typeof(YiFrameworkCoreAutofacModule), typeof(YiTemplateSqlsugarModule), typeof(YiTemplateApplicationModule) diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/YiBBSWebModule.cs b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/YiBBSWebModule.cs index 2fbfc82f..d317c9e8 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/YiBBSWebModule.cs +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/YiBBSWebModule.cs @@ -8,10 +8,12 @@ using Yi.BBS.Sqlsugar; using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection; using Yi.Framework.Core.Autofac; using Yi.RBAC.Application; +using Yi.Framework.AspNetCore; namespace Yi.BBS.Web { [DependsOn( + typeof(YiFrameworkAspNetCoreModule), typeof(YiFrameworkCoreAutofacModule), typeof(YiBBSSqlsugarModule), typeof(YiBBSApplicationModule) diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/YiRBACWebModule.cs b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/YiRBACWebModule.cs index f93033d8..435c95a1 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/YiRBACWebModule.cs +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/YiRBACWebModule.cs @@ -1,5 +1,6 @@ using AspNetCore.Microsoft.AspNetCore.Builder; using StartupModules; +using Yi.Framework.AspNetCore; using Yi.Framework.Auth.JwtBearer; using Yi.Framework.Core; using Yi.Framework.Core.Attributes; @@ -10,6 +11,7 @@ using Yi.RBAC.Sqlsugar; namespace Yi.RBAC.Web { [DependsOn( + typeof(YiFrameworkAspNetCoreModule), typeof(YiFrameworkCoreAutofacModule), typeof(YiRBACSqlsugarModule), typeof(YiRBACApplicationModule) diff --git a/Yi.Framework.Net6/src/project/template/Yi.Template.Web/YiTemplateWebModule.cs b/Yi.Framework.Net6/src/project/template/Yi.Template.Web/YiTemplateWebModule.cs index c7623b63..5ba64864 100644 --- a/Yi.Framework.Net6/src/project/template/Yi.Template.Web/YiTemplateWebModule.cs +++ b/Yi.Framework.Net6/src/project/template/Yi.Template.Web/YiTemplateWebModule.cs @@ -1,5 +1,6 @@ using AspNetCore.Microsoft.AspNetCore.Builder; using StartupModules; +using Yi.Framework.AspNetCore; using Yi.Framework.Auth.JwtBearer; using Yi.Framework.Core; using Yi.Framework.Core.Attributes; @@ -10,6 +11,7 @@ using Yi.Template.Sqlsugar; namespace Yi.Template.Web { [DependsOn( + typeof(YiFrameworkAspNetCoreModule), typeof(YiFrameworkCoreAutofacModule), typeof(YiTemplateSqlsugarModule), typeof(YiTemplateApplicationModule)