mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-31 22:26:36 +08:00
添加缓存模块
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
|
||||
using AspNetCore.Microsoft.AspNetCore.Builder;
|
||||
using Panda.DynamicWebApi;
|
||||
using System.Reflection;
|
||||
using Yi.Framework.Application;
|
||||
using Yi.Framework.Autofac.Extensions;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.AutoMapper;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.Framework.Core.Sqlsugar;
|
||||
using Yi.Framework.Core.Sqlsugar.Repository;
|
||||
@@ -12,19 +15,25 @@ using Yi.Framework.Web;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.WebHost.UseUrls(builder.Configuration.GetValue<string>("StartUrl"));
|
||||
|
||||
//添加模块
|
||||
builder.UseYiModules(
|
||||
typeof(YiFrameworkCoreModule).Assembly,
|
||||
typeof(YiFrameworkCoreAutoMapperModule).Assembly,
|
||||
typeof(YiFrameworkDddModule).Assembly,
|
||||
typeof(YiFrameworkCoreSqlsugarModule).Assembly
|
||||
);
|
||||
|
||||
//使用autofac
|
||||
builder.Host.UseAutoFacServerProviderFactory();
|
||||
|
||||
//添加控制器与动态api
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddDynamicWebApi();
|
||||
|
||||
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
|
||||
//添加swagger
|
||||
builder.Services.AddSwaggerServer<YiFrameworkApplicationModule>();
|
||||
//builder.Services.AddAutoIocServer("Yi.Framework.Core.Sqlsugar");
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Framework.Application\Yi.Framework.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.AspNetCore\Yi.Framework.AspNetCore.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Core.Autofac\Yi.Framework.Core.Autofac.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Core.AutoMapper\Yi.Framework.Core.AutoMapper.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Core.Sqlsugar\Yi.Framework.Core.Sqlsugar.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Core\Yi.Framework.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
//程序启动地址,*代表全部网口
|
||||
"StartUrl": "http://*:19002",
|
||||
|
||||
//数据库列表
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
|
||||
Reference in New Issue
Block a user