From b342e407eda8005a25d04e12a1e64feef0b05d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Sat, 15 Apr 2023 06:46:24 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20Yi.Frame?= =?UTF-8?q?work.Net6/src/project/Template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/project/Template/GlobalUsings.cs | 4 -- .../ApplicationContractsSwaggerDoc.xml | 18 ------ .../Dtos/Student/StudentGetOutputDto.cs | 17 ------ .../School/IStudentService.cs | 18 ------ .../Yi.Template.Application.Contracts.csproj | 23 -------- .../YiTemplateApplicationContractsModule.cs | 27 --------- .../ApplicationSwaggerDoc.xml | 13 ----- .../School/StudentService.cs | 17 ------ .../Yi.Template.Application.csproj | 25 --------- .../YiTemplateApplicationModule.cs | 33 ----------- .../School/ConstClasses/StudentConst.cs | 16 ------ .../Yi.Template.Domain.Shared.csproj | 15 ----- .../YiTemplateDomainSharedModule.cs | 27 --------- .../Yi.Template.Domain/DomainSwaggerDoc.xml | 8 --- .../School/DataSeeds/StudentDataSeed.cs | 27 --------- .../School/Entities/StudentEntity.cs | 25 --------- .../Yi.Template.Domain.csproj | 24 -------- .../YiTemplateDomainModule.cs | 30 ---------- .../Yi.Template.Sqlsugar.csproj | 17 ------ .../YiTemplateSqlsugarModule.cs | 28 ---------- .../Template/Yi.Template.Web/Program.cs | 37 ------------- .../Properties/launchSettings.json | 15 ----- .../Yi.Template.Web/Yi.Template.Web.csproj | 33 ----------- .../Yi.Template.Web/YiTemplateWebModule.cs | 52 ------------------ .../Template/Yi.Template.Web/appsettings.json | 41 -------------- .../project/Template/Yi.Template.Web/key.pem | 28 ---------- .../Template/Yi.Template.Web/public.pem | 9 --- .../Yi.Template.Web/yi-sqlsugar-dev.db | Bin 12288 -> 0 bytes 28 files changed, 627 deletions(-) delete mode 100644 Yi.Framework.Net6/src/project/Template/GlobalUsings.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/ApplicationContractsSwaggerDoc.xml delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/Dtos/Student/StudentGetOutputDto.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/IStudentService.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/Yi.Template.Application.Contracts.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/YiTemplateApplicationContractsModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application/ApplicationSwaggerDoc.xml delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application/School/StudentService.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application/Yi.Template.Application.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Application/YiTemplateApplicationModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/School/ConstClasses/StudentConst.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/Yi.Template.Domain.Shared.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/YiTemplateDomainSharedModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/DomainSwaggerDoc.xml delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/DataSeeds/StudentDataSeed.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/Entities/StudentEntity.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/Yi.Template.Domain.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/YiTemplateDomainModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/Yi.Template.Sqlsugar.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/YiTemplateSqlsugarModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Program.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Properties/launchSettings.json delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Yi.Template.Web.csproj delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/key.pem delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/public.pem delete mode 100644 Yi.Framework.Net6/src/project/Template/Yi.Template.Web/yi-sqlsugar-dev.db diff --git a/Yi.Framework.Net6/src/project/Template/GlobalUsings.cs b/Yi.Framework.Net6/src/project/Template/GlobalUsings.cs deleted file mode 100644 index d6ecb816..00000000 --- a/Yi.Framework.Net6/src/project/Template/GlobalUsings.cs +++ /dev/null @@ -1,4 +0,0 @@ -global using Yi.Framework.Core.Attributes; -global using Yi.Framework.Core.Helper; -global using Yi.Framework.Core.Model; -global using Yi.Framework.Core.Exceptions; \ No newline at end of file diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/ApplicationContractsSwaggerDoc.xml b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/ApplicationContractsSwaggerDoc.xml deleted file mode 100644 index b9705a65..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/ApplicationContractsSwaggerDoc.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Yi.Template.Application.Contracts - - - - - Student输入创建对象 - - - - - Student - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/Dtos/Student/StudentGetOutputDto.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/Dtos/Student/StudentGetOutputDto.cs deleted file mode 100644 index 22afda93..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/Dtos/Student/StudentGetOutputDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Ddd.Dtos; - -namespace Yi.Template.Application.Contracts.School.Dtos -{ - public class StudentGetOutputDto : IEntityDto - { - public long Id { get; set; } - public string Name { get; set; } - public int? Height { get; set; } - public string? Phone { get; set; } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/IStudentService.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/IStudentService.cs deleted file mode 100644 index a721c5e3..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/School/IStudentService.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Template.Application.Contracts.School.Dtos; -using Yi.Framework.Ddd.Services.Abstract; - -namespace Yi.Template.Application.Contracts.School -{ - /// - /// Student - /// - public interface IStudentService : ICrudAppService - { - - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/Yi.Template.Application.Contracts.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/Yi.Template.Application.Contracts.csproj deleted file mode 100644 index ea141dde..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/Yi.Template.Application.Contracts.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net6.0 - enable - enable - True - ./ApplicationContractsSwaggerDoc.xml - - - - - - - - - - - Always - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/YiTemplateApplicationContractsModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/YiTemplateApplicationContractsModule.cs deleted file mode 100644 index d2ea5d76..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application.Contracts/YiTemplateApplicationContractsModule.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using StartupModules; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Core.Attributes; -using Yi.Template.Domain.Shared; - -namespace Yi.Template.Application.Contracts -{ - [DependsOn( - typeof(YiTemplateDomainSharedModule) - )] - public class YiTemplateApplicationContractsModule : IStartupModule - { - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - } - - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/ApplicationSwaggerDoc.xml b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/ApplicationSwaggerDoc.xml deleted file mode 100644 index da7b20a5..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/ApplicationSwaggerDoc.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - Yi.Template.Application - - - - - Student服务实现 - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/School/StudentService.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/School/StudentService.cs deleted file mode 100644 index cd961206..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/School/StudentService.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Yi.Template.Application.Contracts.School; -using Cike.AutoWebApi.Setting; -using Yi.Template.Application.Contracts.School.Dtos; -using Yi.Template.Domain.School.Entities; -using Yi.Framework.Ddd.Services; - -namespace Yi.Template.Application.School -{ - /// - /// Student服务实现 - /// - [AppService] - public class StudentService : CrudAppService, - IStudentService, IAutoApiService - { - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/Yi.Template.Application.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/Yi.Template.Application.csproj deleted file mode 100644 index 0a5bab98..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/Yi.Template.Application.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net6.0 - enable - enable - True - ./ApplicationSwaggerDoc.xml - - - - - - - - - - - - - Always - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/YiTemplateApplicationModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/YiTemplateApplicationModule.cs deleted file mode 100644 index c58eb473..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Application/YiTemplateApplicationModule.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using StartupModules; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Template.Application.Contracts; -using Yi.Framework.Auth.JwtBearer; -using Yi.Framework.Core.Attributes; -using Yi.Framework.Data; -using Yi.Framework.Ddd; -using Yi.Template.Domain; - -namespace Yi.Template.Application -{ - [DependsOn( - typeof(YiTemplateApplicationContractsModule), - typeof(YiTemplateDomainModule), - typeof(YiFrameworkAuthJwtBearerModule) - )] - public class YiTemplateApplicationModule : IStartupModule - { - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - } - - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/School/ConstClasses/StudentConst.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/School/ConstClasses/StudentConst.cs deleted file mode 100644 index f22c18ed..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/School/ConstClasses/StudentConst.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Yi.Template.Domain.Shared.School.ConstClasses -{ - /// - /// 常量定义 - /// - - public class StudentConst - { - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/Yi.Template.Domain.Shared.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/Yi.Template.Domain.Shared.csproj deleted file mode 100644 index 692994fe..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/Yi.Template.Domain.Shared.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/YiTemplateDomainSharedModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/YiTemplateDomainSharedModule.cs deleted file mode 100644 index 4e14cee3..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain.Shared/YiTemplateDomainSharedModule.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using StartupModules; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Core.Attributes; -using Yi.Framework.Ddd; - -namespace Yi.Template.Domain.Shared -{ - [DependsOn( - typeof(YiFrameworkDddModule) - )] - public class YiTemplateDomainSharedModule : IStartupModule - { - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - } - - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/DomainSwaggerDoc.xml b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/DomainSwaggerDoc.xml deleted file mode 100644 index 01f6d524..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/DomainSwaggerDoc.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Yi.Template.Domain - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/DataSeeds/StudentDataSeed.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/DataSeeds/StudentDataSeed.cs deleted file mode 100644 index bb3092b9..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/DataSeeds/StudentDataSeed.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Data.DataSeeds; -using Yi.Framework.Ddd.Repositories; -using Yi.Template.Domain.School.Entities; - -namespace Yi.Template.Domain.School.DataSeeds -{ - [AppService(typeof(IDataSeed))] - public class StudentDataSeed : AbstractDataSeed - { - public StudentDataSeed(IRepository repository) : base(repository) - { - } - - public override List GetSeedData() - { - return new List() { new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好", Phone = "123", Height = 188, IsDeleted = false } , - new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好1", Phone = "123", Height = 188, IsDeleted = false }, - new StudentEntity { Id = SnowflakeHelper.NextId, Name = "你好2", Phone = "123", Height = 188, IsDeleted = false } - }; - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/Entities/StudentEntity.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/Entities/StudentEntity.cs deleted file mode 100644 index 61245c3e..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/School/Entities/StudentEntity.cs +++ /dev/null @@ -1,25 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Data.Entities; -using Yi.Framework.Ddd.Entities; - -namespace Yi.Template.Domain.School.Entities -{ - [SugarTable("Student")] - public class StudentEntity : IEntity,ISoftDelete - { - [SugarColumn(IsPrimaryKey = true)] - public long Id { get; set; } - - public string Name { get; set; } - - public int? Height { get; set; } - - public string? Phone { get; set; } - public bool IsDeleted { get; set; } = false; - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/Yi.Template.Domain.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/Yi.Template.Domain.csproj deleted file mode 100644 index 71936c72..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/Yi.Template.Domain.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net6.0 - enable - enable - True - ./DomainSwaggerDoc.xml - - - - - - - - - - - - Always - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/YiTemplateDomainModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/YiTemplateDomainModule.cs deleted file mode 100644 index e94138cd..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Domain/YiTemplateDomainModule.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using StartupModules; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Core.Attributes; -using Yi.Framework.Data; -using Yi.Template.Domain.Shared; - -namespace Yi.Template.Domain -{ - [DependsOn( - typeof(YiTemplateDomainSharedModule), - typeof(YiFrameworkDataModule) - )] - public class YiTemplateDomainModule : IStartupModule - { - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - } - - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - //services.AddTransient(); - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/Yi.Template.Sqlsugar.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/Yi.Template.Sqlsugar.csproj deleted file mode 100644 index 8f842da8..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/Yi.Template.Sqlsugar.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - - - - - diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/YiTemplateSqlsugarModule.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/YiTemplateSqlsugarModule.cs deleted file mode 100644 index 6176073a..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Sqlsugar/YiTemplateSqlsugarModule.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using StartupModules; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Yi.Framework.Core.Attributes; -using Yi.Framework.Core.Sqlsugar; -using Yi.Template.Domain; - -namespace Yi.Template.Sqlsugar -{ - [DependsOn(typeof(YiFrameworkCoreSqlsugarModule), - typeof(YiTemplateDomainModule))] - public class YiTemplateSqlsugarModule : IStartupModule - { - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - } - - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - //services.AddTransient(); - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Program.cs b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Program.cs deleted file mode 100644 index 86c4b3d2..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Program.cs +++ /dev/null @@ -1,37 +0,0 @@ -using AspNetCore.Microsoft.AspNetCore.Hosting; -using NLog; -using NLog.Extensions.Logging; -using Yi.Framework.Core.Autofac.Extensions; -using Yi.Framework.Core.Autofac.Modules; -using Yi.Framework.Core.Extensions; -using Yi.Framework.Core.Module; -using Yi.Template.Web; - - -var builder = WebApplication.CreateBuilder(args); -//配置日志 -builder.Services.AddLogging(builder => { builder.ClearProviders().AddNLog("nlog.config").SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); }); -Logger? _logger = LogManager.Setup().LoadConfigurationFromAssemblyResource(typeof(Program).Assembly).GetCurrentClassLogger(); -_logger.Info("-----( ¯ □ ¯ )YiFrameowrk框架启动-----"); -//设置启动url -builder.WebHost.UseStartUrlsServer(builder.Configuration); - -//添加模块 -builder.UseYiModules(typeof(YiTemplateWebModule)); - -//添加autofac模块,需要添加模块 -builder.Host.ConfigureAutoFacContainer(container => -{ - container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, ModuleAssembly.Assemblies); -}); - -var app = builder.Build(); - -//全局错误中间件,需要放在最早 -app.UseErrorHandlingServer(); - -app.UseAuthentication(); -app.UseAuthorization(); -app.MapControllers(); - -app.Run(); diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Properties/launchSettings.json b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Properties/launchSettings.json deleted file mode 100644 index 1384d89f..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Properties/launchSettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "profiles": { - "Yi.Template.Web": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:19002", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Yi.Template.Web.csproj b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Yi.Template.Web.csproj deleted file mode 100644 index 97d143a9..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/Yi.Template.Web.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - net6.0 - enable - enable - - - - - - - - - - - - - - Always - - - - - - Always - - - Always - - - - 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 deleted file mode 100644 index 194428a6..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/YiTemplateWebModule.cs +++ /dev/null @@ -1,52 +0,0 @@ -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; -using Yi.Framework.Core.Autofac; -using Yi.Framework.Core.Module; -using Yi.Framework.Data.Json; -using Yi.Template.Application; -using Yi.Template.Sqlsugar; - -namespace Yi.Template.Web -{ - [DependsOn( - typeof(YiFrameworkAspNetCoreModule), - typeof(YiFrameworkCoreAutofacModule), - typeof(YiTemplateSqlsugarModule), - typeof(YiTemplateApplicationModule) - )] - public class YiTemplateWebModule : IStartupModule - { - public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) - { - //添加控制器与动态api - services.AddControllers().AddJsonOptions(opt => { - opt.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss")); - }); - services.AddAutoApiService(opt => - { - //NETServiceTest所在程序集添加进动态api配置 - opt.CreateConventional(ModuleAssembly.Assemblies, option => option.RootPath = string.Empty); - }); - - //添加swagger - services.AddSwaggerServer(); - } - public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context) - { - //if (app.Environment.IsDevelopment()) - { - app.UseSwaggerServer(); - } - - app.UseHttpsRedirection(); - - app.UseAuthorization(); - - app.UseRouting(); - } - } -} 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 deleted file mode 100644 index ddf70ea3..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/appsettings.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - //"Default": "Debug", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*", - - //程序启动地址,*代表全部网口 - "StartUrl": "http://*:19002", - - //数据库类型列表 - "DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ], - - "DbConnOptions": { - "Url": "DataSource=yi-sqlsugar-dev.db", - "DbType": "Sqlite", - "EnabledDbSeed": false, - "EnabledReadWrite": false, - "EnabledCodeFirst": true, - "EntityAssembly": null, - "ReadUrl": [ - "DataSource=[xxxx]", //sqlite - "server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //mysql - "Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //sqlserver - ] - }, - - //授权 - "JwtTokenOptions": { - "Audience": "yi", - "Issuer": "localhost:19002", - "Subject": "yiframwork", - "ExpSecond": 3600 - }, - - //开启种子数据 - "EnabledDataSeed": true -} diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/key.pem b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/key.pem deleted file mode 100644 index 3314ab6e..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7VJTUt9Us8cKj -MzEfYyjiWA4R4/M2bS1GB4t7NXp98C3SC6dVMvDuictGeurT8jNbvJZHtCSuYEvu -NMoSfm76oqFvAp8Gy0iz5sxjZmSnXyCdPEovGhLa0VzMaQ8s+CLOyS56YyCFGeJZ -qgtzJ6GR3eqoYSW9b9UMvkBpZODSctWSNGj3P7jRFDO5VoTwCQAWbFnOjDfH5Ulg -p2PKSQnSJP3AJLQNFNe7br1XbrhV//eO+t51mIpGSDCUv3E0DDFcWDTH9cXDTTlR -ZVEiR2BwpZOOkE/Z0/BVnhZYL71oZV34bKfWjQIt6V/isSMahdsAASACp4ZTGtwi -VuNd9tybAgMBAAECggEBAKTmjaS6tkK8BlPXClTQ2vpz/N6uxDeS35mXpqasqskV -laAidgg/sWqpjXDbXr93otIMLlWsM+X0CqMDgSXKejLS2jx4GDjI1ZTXg++0AMJ8 -sJ74pWzVDOfmCEQ/7wXs3+cbnXhKriO8Z036q92Qc1+N87SI38nkGa0ABH9CN83H -mQqt4fB7UdHzuIRe/me2PGhIq5ZBzj6h3BpoPGzEP+x3l9YmK8t/1cN0pqI+dQwY -dgfGjackLu/2qH80MCF7IyQaseZUOJyKrCLtSD/Iixv/hzDEUPfOCjFDgTpzf3cw -ta8+oE4wHCo1iI1/4TlPkwmXx4qSXtmw4aQPz7IDQvECgYEA8KNThCO2gsC2I9PQ -DM/8Cw0O983WCDY+oi+7JPiNAJwv5DYBqEZB1QYdj06YD16XlC/HAZMsMku1na2T -N0driwenQQWzoev3g2S7gRDoS/FCJSI3jJ+kjgtaA7Qmzlgk1TxODN+G1H91HW7t -0l7VnL27IWyYo2qRRK3jzxqUiPUCgYEAx0oQs2reBQGMVZnApD1jeq7n4MvNLcPv -t8b/eU9iUv6Y4Mj0Suo/AU8lYZXm8ubbqAlwz2VSVunD2tOplHyMUrtCtObAfVDU -AhCndKaA9gApgfb3xw1IKbuQ1u4IF1FJl3VtumfQn//LiH1B3rXhcdyo3/vIttEk -48RakUKClU8CgYEAzV7W3COOlDDcQd935DdtKBFRAPRPAlspQUnzMi5eSHMD/ISL -DY5IiQHbIH83D4bvXq0X7qQoSBSNP7Dvv3HYuqMhf0DaegrlBuJllFVVq9qPVRnK -xt1Il2HgxOBvbhOT+9in1BzA+YJ99UzC85O0Qz06A+CmtHEy4aZ2kj5hHjECgYEA -mNS4+A8Fkss8Js1RieK2LniBxMgmYml3pfVLKGnzmng7H2+cwPLhPIzIuwytXywh -2bzbsYEfYx3EoEVgMEpPhoarQnYPukrJO4gwE2o5Te6T5mJSZGlQJQj9q4ZB2Dfz -et6INsK0oG8XVGXSpQvQh3RUYekCZQkBBFcpqWpbIEsCgYAnM3DQf3FJoSnXaMhr -VBIovic5l0xFkEHskAjFTevO86Fsz1C2aSeRKSqGFoOQ0tmJzBEs1R6KqnHInicD -TQrKhArgLXX4v3CddjfTRJkFWDbE/CkvKZNOrcf1nhaGCPspRJj2KUkj1Fhl9Cnc -dn/RsYEONbwQSjIfMPkvxF+8HQ== ------END PRIVATE KEY----- \ No newline at end of file diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/public.pem b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/public.pem deleted file mode 100644 index 1c9b622d..00000000 --- a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/public.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo -4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u -+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizskuemMghRniWaoLcyeh -kd3qqGElvW/VDL5AaWTg0nLVkjRo9z+40RQzuVaE8AkAFmxZzow3x+VJYKdjykkJ -0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg -cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc -mwIDAQAB ------END PUBLIC KEY----- \ No newline at end of file diff --git a/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/Template/Yi.Template.Web/yi-sqlsugar-dev.db deleted file mode 100644 index a53c95870263438b535135165ebe0fd57796401a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI$zfQtH90%~bmQ?%$H8GJO%P*ZYQ6u;Qq7o${D&pWoik#2{io#)B^+{Yzbnp%2 z0azWKCBA?Iqt{ZR#=*tJn0$Z9<$C?zwRfMbJv_)cQqXC$)vzV4vT4RSTO(qOg;dj3 z8x>a<-n~(Im@SET$=E=T)? z>~6YnOgoulT2yoLc0*WnVYg0dc56Phva;|o*PpO0oN7&4q@E(GqBVSqpX}F~?zgqx zJNz`;-V}8qg};YS8z7>ECC!MX6P!72MO?Pe>*}k%WOroKAD4n7l#;=P_gx?MJR_>< z<^wbPW>0k}2tWV=5P$##AOHafKmY;|fB*#kT3}8$jD$85o^7AqKWWq2OZTRK+fA{@ zWNLLz`;zftmh`hYH;nklIyTJwXhNMyH=mjLX1=Np1px>^00Izz00bZa0SG_<0uX?} XzY>_z4L0ZBjSJgM_^Us?~p>