Conditionally switch on the custom runtime in a functional app

This commit is contained in:
Dave Syer
2019-04-01 15:38:13 +01:00
parent 6eea43b266
commit 2efeafd793

View File

@@ -32,6 +32,11 @@ public class CustomRuntimeInitializer
@Override
public void initialize(GenericApplicationContext context) {
Boolean enabled = context.getEnvironment()
.getProperty("spring.cloud.function.web.export.enabled", Boolean.class);
if (enabled != null) {
return;
}
if (ContextFunctionCatalogInitializer.enabled && context.getEnvironment()
.getProperty("spring.functional.enabled", Boolean.class, false)) {
if (context.getBeanFactory().getBeanNamesForType(DestinationResolver.class,