Do not assume CloudFoundry as Actuator dependency

Unless CloudFoundry is also a dependency, do not add CloudFoundry libraries/code.
[Fixes #46]
This commit is contained in:
Chris Cheetham 2021-02-05 11:58:23 -05:00
Родитель 9a4f7aaefd
Коммит 3cb0bb5815
2 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -64,9 +64,14 @@
{{#dynamic-logger}}
<PackageReference Include="Steeltoe.Extensions.Logging.DynamicLogger" Version="{{SteeltoeVersion}}" />
{{/dynamic-logger}}
{{#actuator-or-cloud-foundry}}
{{#actuator}}
{{#cloud-foundry}}
<PackageReference Include="Steeltoe.Management.CloudFoundryCore" Version="{{SteeltoeVersion}}" />
{{/actuator-or-cloud-foundry}}
{{/cloud-foundry}}
{{^cloud-foundry}}
<PackageReference Include="Steeltoe.Management.EndpointCore" Version="{{SteeltoeVersion}}" />
{{/cloud-foundry}}
{{/actuator}}
{{#config-server}}
<PackageReference Include="Steeltoe.Extensions.Configuration.ConfigServerCore" Version="{{SteeltoeVersion}}" />
{{/config-server}}

Просмотреть файл

@ -34,7 +34,12 @@ using Steeltoe.Connector.SqlServer.EFCore;
using Steeltoe.Discovery.Client;
{{/eureka-client}}
{{#actuator}}
{{#cloud-foundry}}
using Steeltoe.Management.CloudFoundry;
{{/cloud-foundry}}
{{^cloud-foundry}}
using Steeltoe.Management.Endpoint;
{{/cloud-foundry}}
{{/actuator}}
{{#RequiresHttps}}
using Microsoft.AspNetCore.HttpsPolicy;
@ -78,7 +83,12 @@ namespace {{Namespace}}
services.AddMySqlConnection(Configuration);
{{/mysql}}
{{#actuator}}
{{#cloud-foundry}}
services.AddCloudFoundryActuators(Configuration);
{{/cloud-foundry}}
{{^cloud-foundry}}
services.AddAllActuators(Configuration);
{{/cloud-foundry}}
{{/actuator}}
{{#eureka-client}}
services.AddDiscoveryClient(Configuration);