上传框架

This commit is contained in:
lzw
2021-10-12 12:50:52 +08:00
parent 9cf6e29e02
commit bcf39d525b
14 changed files with 232 additions and 21 deletions

View File

@@ -35,13 +35,13 @@ namespace Yi.Framework.ApiMicroservice
services.AddControllers();
services.AddCors(options => options.AddPolicy("CorsPolicy",//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
builder =>
{
builder.AllowAnyMethod()
.SetIsOriginAllowed(_ => true)
.AllowAnyHeader()
.AllowCredentials();
}));
builder =>
{
builder.AllowAnyMethod()
.SetIsOriginAllowed(_ => true)
.AllowAnyHeader()
.AllowCredentials();
}));
services.Configure<SqliteOptions>(this.Configuration.GetSection("SqliteConn"));
services.AddScoped<DbContext, DataContext>();
@@ -49,6 +49,9 @@ builder =>
services.AddScoped<IUserService, UserService>();
services.AddScoped<IRoleService, RoleService>();
services.AddScoped<IMouldService, MouldService>();
services.AddScoped<IMenuService, MenuService>();
services.AddScoped<ILoopModelService, LoopModelService>();
services.AddSwaggerGen(c =>
{