mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-12 11:32:10 +08:00
- add service-provider validation
This commit is contained in:
parent
1c4f20ddbc
commit
13f5a8265d
@ -10,6 +10,8 @@ var env = builder.Environment;
|
||||
var appOptions = builder.Services.GetOptions<AppOptions>("AppOptions");
|
||||
Console.WriteLine(FiggleFonts.Standard.Render(appOptions.Name));
|
||||
|
||||
|
||||
|
||||
builder.AddCustomSerilog(env);
|
||||
builder.Services.AddJwt();
|
||||
builder.Services.AddControllers();
|
||||
|
||||
@ -3,6 +3,14 @@ using BuildingBlocks.Web;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Host.UseDefaultServiceProvider((context, options) =>
|
||||
{
|
||||
// Service provider validation
|
||||
// ref: https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/
|
||||
options.ValidateScopes = context.HostingEnvironment.IsDevelopment() || context.HostingEnvironment.IsStaging() || context.HostingEnvironment.IsEnvironment("tests");
|
||||
options.ValidateOnBuild = true;
|
||||
});
|
||||
|
||||
builder.AddMinimalEndpoints();
|
||||
builder.AddInfrastructure();
|
||||
|
||||
|
||||
@ -3,6 +3,14 @@ using Flight.Extensions.Infrastructure;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Host.UseDefaultServiceProvider((context, options) =>
|
||||
{
|
||||
// Service provider validation
|
||||
// ref: https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/
|
||||
options.ValidateScopes = context.HostingEnvironment.IsDevelopment() || context.HostingEnvironment.IsStaging() || context.HostingEnvironment.IsEnvironment("tests");
|
||||
options.ValidateOnBuild = true;
|
||||
});
|
||||
|
||||
builder.AddMinimalEndpoints();
|
||||
builder.AddInfrastructure();
|
||||
|
||||
|
||||
@ -3,6 +3,14 @@ using Identity.Extensions.Infrastructure;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Host.UseDefaultServiceProvider((context, options) =>
|
||||
{
|
||||
// Service provider validation
|
||||
// ref: https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/
|
||||
options.ValidateScopes = context.HostingEnvironment.IsDevelopment() || context.HostingEnvironment.IsStaging() || context.HostingEnvironment.IsEnvironment("tests");
|
||||
options.ValidateOnBuild = true;
|
||||
});
|
||||
|
||||
builder.AddMinimalEndpoints();
|
||||
builder.AddInfrastructure();
|
||||
|
||||
|
||||
@ -3,6 +3,13 @@ using Passenger.Extensions.Infrastructure;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Host.UseDefaultServiceProvider((context, options) =>
|
||||
{
|
||||
// Service provider validation
|
||||
// ref: https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/
|
||||
options.ValidateScopes = context.HostingEnvironment.IsDevelopment() || context.HostingEnvironment.IsStaging() || context.HostingEnvironment.IsEnvironment("tests");
|
||||
options.ValidateOnBuild = true;
|
||||
});
|
||||
|
||||
builder.AddMinimalEndpoints();
|
||||
builder.AddInfrastructure();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user