Merge branch 'dev'
This commit is contained in:
Коммит
f8cd2854bf
|
@ -47,7 +47,7 @@ namespace {{ProjectNameSpace}}.Controllers
|
|||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ValuesController : ControllerBase
|
||||
{
|
||||
{
|
||||
{{^MoreThanOneValuesControllerWithArgs}}
|
||||
{{#SQLServer}}
|
||||
private readonly SqlConnection _dbConnection;
|
||||
|
|
|
@ -91,10 +91,10 @@ namespace {{ProjectNameSpace}}
|
|||
{{#Actuators}}
|
||||
{{#CloudFoundry}}
|
||||
services.ConfigureCloudFoundryOptions(Configuration);
|
||||
services.AddCloudFoundryActuators(Configuration, MediaTypeVersion.V2, ActuatorContext.ActuatorAndCloudFoundry);
|
||||
services.AddCloudFoundryActuators(Configuration, MediaTypeVersion.V2, ActuatorContext.ActuatorAndCloudFoundry);
|
||||
{{/CloudFoundry}}
|
||||
{{^CloudFoundry}}
|
||||
services.AddCloudFoundryActuators(Configuration);
|
||||
services.AddCloudFoundryActuators(Configuration);
|
||||
{{/CloudFoundry}}
|
||||
{{/Actuators}}
|
||||
{{#Discovery}}
|
||||
|
@ -137,42 +137,39 @@ namespace {{ProjectNameSpace}}
|
|||
{{^TargetFrameworkVersion22}}
|
||||
services.AddMvc();
|
||||
{{/TargetFrameworkVersion22}}
|
||||
}
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
{{#RequiresHttps}}
|
||||
else
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
{{#RequiresHttps}}
|
||||
else
|
||||
{
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
app.UseHttpsRedirection();
|
||||
{{/RequiresHttps}}
|
||||
{{#Auth}}
|
||||
app.UseAuthentication();
|
||||
{{/Auth}}
|
||||
|
||||
{{#Actuators}}
|
||||
{{#CloudFoundry}}
|
||||
app.UseCloudFoundryActuators(MediaTypeVersion.V2, ActuatorContext.ActuatorAndCloudFoundry);
|
||||
{{/CloudFoundry}}
|
||||
{{^CloudFoundry}}
|
||||
app.UseCloudFoundryActuators();
|
||||
{{/CloudFoundry}}
|
||||
{{/Actuators}}
|
||||
|
||||
{{#Discovery}}
|
||||
app.UseDiscoveryClient();
|
||||
{{/Discovery}}
|
||||
app.UseMvc();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
{{/RequiresHttps}}
|
||||
|
||||
|
||||
{{#Auth}}
|
||||
app.UseAuthentication();
|
||||
{{/Auth}}
|
||||
|
||||
{{#Actuators}}
|
||||
{{#CloudFoundry}}
|
||||
app.UseCloudFoundryActuators(MediaTypeVersion.V2, ActuatorContext.ActuatorAndCloudFoundry);
|
||||
{{/CloudFoundry}}
|
||||
{{^CloudFoundry}}
|
||||
app.UseCloudFoundryActuators();
|
||||
{{/CloudFoundry}}
|
||||
{{/Actuators}}
|
||||
|
||||
{{#Discovery}}
|
||||
app.UseDiscoveryClient();
|
||||
{{/Discovery}}
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче