mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-16 14:16:37 +08:00
删除文件 Yi.Framework.Net6/src/project/Template
This commit is contained in:
@@ -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;
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Yi.Template.Application.Contracts</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:Yi.Template.Application.Contracts.School.Dtos.StudentCreateInputVo">
|
|
||||||
<summary>
|
|
||||||
Student输入创建对象
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:Yi.Template.Application.Contracts.School.IStudentService">
|
|
||||||
<summary>
|
|
||||||
Student
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
@@ -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<long>
|
|
||||||
{
|
|
||||||
public long Id { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
public int? Height { get; set; }
|
|
||||||
public string? Phone { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Student
|
|
||||||
/// </summary>
|
|
||||||
public interface IStudentService : ICrudAppService<StudentGetOutputDto, StudentGetListOutputDto, long, StudentGetListInputVo, StudentCreateInputVo, StudentUpdateInputVo>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
|
||||||
<DocumentationFile>./ApplicationContractsSwaggerDoc.xml</DocumentationFile>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="ApplicationContractsSwaggerDoc.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Yi.Template.Application</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:Yi.Template.Application.School.StudentService">
|
|
||||||
<summary>
|
|
||||||
Student服务实现
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
@@ -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
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Student服务实现
|
|
||||||
/// </summary>
|
|
||||||
[AppService]
|
|
||||||
public class StudentService : CrudAppService<StudentEntity, StudentGetOutputDto, StudentGetListOutputDto, long, StudentGetListInputVo, StudentCreateInputVo, StudentUpdateInputVo>,
|
|
||||||
IStudentService, IAutoApiService
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
|
||||||
<DocumentationFile>./ApplicationSwaggerDoc.xml</DocumentationFile>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Auth.JwtBearer\Yi.Framework.Auth.JwtBearer.csproj" />
|
|
||||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Uow\Yi.Framework.Uow.csproj" />
|
|
||||||
<ProjectReference Include="..\Yi.Template.Application.Contracts\Yi.Template.Application.Contracts.csproj" />
|
|
||||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="ApplicationSwaggerDoc.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 常量定义
|
|
||||||
/// </summary>
|
|
||||||
|
|
||||||
public class StudentConst
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd\Yi.Framework.Ddd.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Yi.Template.Domain</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
@@ -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<StudentEntity>
|
|
||||||
{
|
|
||||||
public StudentDataSeed(IRepository<StudentEntity> repository) : base(repository)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override List<StudentEntity> GetSeedData()
|
|
||||||
{
|
|
||||||
return new List<StudentEntity>() { 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 }
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<long>,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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
|
||||||
<DocumentationFile>./DomainSwaggerDoc.xml</DocumentationFile>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
|
|
||||||
<ProjectReference Include="..\Yi.Template.Domain.Shared\Yi.Template.Domain.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="DomainSwaggerDoc.xml">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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<StudentManager>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
|
||||||
<ProjectReference Include="..\Yi.Template.Domain\Yi.Template.Domain.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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<IStudentRepository, StudentRepository>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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();
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Yi.Template.Application\Yi.Template.Application.csproj" />
|
|
||||||
<ProjectReference Include="..\Yi.Template.Sqlsugar\Yi.Template.Sqlsugar.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Update="nlog.config">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="key.pem">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="public.pem">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -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<YiTemplateApplicationModule>();
|
|
||||||
}
|
|
||||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
|
||||||
{
|
|
||||||
//if (app.Environment.IsDevelopment())
|
|
||||||
{
|
|
||||||
app.UseSwaggerServer();
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
|
||||||
|
|
||||||
app.UseAuthorization();
|
|
||||||
|
|
||||||
app.UseRouting();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -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-----
|
|
||||||
@@ -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-----
|
|
||||||
Binary file not shown.
Reference in New Issue
Block a user