feat:基于furion搭建

This commit is contained in:
橙子
2023-04-12 22:30:42 +08:00
parent ccd39474c7
commit 5efdffcda8
631 changed files with 468 additions and 27264 deletions

View File

@@ -0,0 +1,45 @@
using Furion;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Yi.Furion.Rbac.Web.Core;
public class Startup : AppStartup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddConsoleFormatter();
services.AddJwt<JwtHandler>();
services.AddCorsAccessor();
services.AddControllers()
.AddInjectWithUnifyResult();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseCorsAccessor();
app.UseAuthentication();
app.UseAuthorization();
app.UseInject(string.Empty);
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}