diff --git a/common/twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/OnMissingStreamFunctionDefinitionCondition.java b/common/twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/OnMissingStreamFunctionDefinitionCondition.java deleted file mode 100644 index 55565bdd..00000000 --- a/common/twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/OnMissingStreamFunctionDefinitionCondition.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2015-2020 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.cloud.fn.common.twitter; - -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.condition.NoneNestedConditions; - -/** - * @author Christian Tzolov - */ -public class OnMissingStreamFunctionDefinitionCondition extends NoneNestedConditions { - - public OnMissingStreamFunctionDefinitionCondition() { - super(ConfigurationPhase.REGISTER_BEAN); - } - - @ConditionalOnProperty(name = "spring.cloud.stream.function.definition") - static class OnFunctionDslProperty { - } -} diff --git a/consumer/websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServer.java b/consumer/websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServer.java index 4986ed74..1447ab40 100644 --- a/consumer/websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServer.java +++ b/consumer/websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServer.java @@ -37,7 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; /** * Bootstraps a Netty server using the {@link WebsocketConsumerServerInitializer}. Also adds - * a {@link LoggingHandler} and uses the logLevel + * a {@link LoggingHandler} and uses the logLevel * from {@link WebsocketConsumerProperties#logLevel}. * * @author Oliver Moser diff --git a/function/task-launch-request-function/src/test/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionApplicationTests.java b/function/task-launch-request-function/src/test/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionApplicationTests.java index e1098b5e..f23399ae 100644 --- a/function/task-launch-request-function/src/test/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionApplicationTests.java +++ b/function/task-launch-request-function/src/test/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionApplicationTests.java @@ -54,7 +54,7 @@ public class TaskLaunchRequestFunctionApplicationTests { ApplicationContext context = springApplicationBuilder.properties( "spring.jmx.enabled=false", - "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name=foo") .run(); @@ -70,7 +70,7 @@ public class TaskLaunchRequestFunctionApplicationTests { public void dataflowTaskLaunchRequestWithArgsAndDeploymentProperties() throws IOException { ApplicationContext context = springApplicationBuilder.properties( - "spring.jmx.enabled=false", "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.jmx.enabled=false", "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name=foo", "task.launch.request.args=foo=bar,baz=boo", "task.launch.request.deploymentProperties=count=3") .run(); @@ -87,7 +87,7 @@ public class TaskLaunchRequestFunctionApplicationTests { public void taskLaunchRequestWithCommandLineArgsMessageMapper() throws IOException { ApplicationContext context = springApplicationBuilder.properties( - "spring.jmx.enabled=false", "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.jmx.enabled=false", "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name=foo", "enhanceTLRArgs=true") .run(); @@ -104,7 +104,7 @@ public class TaskLaunchRequestFunctionApplicationTests { public void taskLaunchRequestWithArgExpressions() throws IOException { ApplicationContext context = springApplicationBuilder.properties( "spring.jmx.enabled=false", - "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name=foo", "task.launch.request.arg-expressions=foo=payload.toUpperCase(),bar=payload.substring(0,2)") .run(); @@ -124,7 +124,7 @@ public class TaskLaunchRequestFunctionApplicationTests { @DirtiesContext public void taskLaunchRequestWithIntPayload() throws IOException { ApplicationContext context = springApplicationBuilder.properties( - "spring.jmx.enabled=false", "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.jmx.enabled=false", "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name=foo", "task.launch.request.arg-expressions=i=payload") .run(); @@ -145,7 +145,7 @@ public class TaskLaunchRequestFunctionApplicationTests { @DirtiesContext public void taskNameExpression() throws IOException { ApplicationContext context = springApplicationBuilder.properties( - "spring.jmx.enabled=false", "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.jmx.enabled=false", "spring.cloud.function.definition=taskLaunchRequestFunction", "task.launch.request.task-name-expression=payload+'_task'") .run(); @@ -164,7 +164,7 @@ public class TaskLaunchRequestFunctionApplicationTests { @DirtiesContext public void customTaskNameExtractor() throws IOException { ApplicationContext context = springApplicationBuilder.properties( - "spring.jmx.enabled=false", "spring.cloud.stream.function.definition=taskLaunchRequestFunction", + "spring.jmx.enabled=false", "spring.cloud.function.definition=taskLaunchRequestFunction", "customTaskNameExtractor=true") .run(); TaskLaunchRequestFunction taskLaunchRequestFunction = context.getBean(TaskLaunchRequestFunction.class); diff --git a/function/twitter-function/README.adoc b/function/twitter-function/README.adoc index 7a957afd..1427a796 100644 --- a/function/twitter-function/README.adoc +++ b/function/twitter-function/README.adoc @@ -55,7 +55,7 @@ public class MyTwitterTrendBootApp { public static void main(String[] args) { SpringApplication.run(MyTwitterTrendBootApp.class, - "--spring.cloud.stream.function.definition=trend|twitterTrendFunction|managedJson"); + "--spring.cloud.function.definition=trend|twitterTrendFunction|managedJson"); } } ---- @@ -110,7 +110,7 @@ public class MyTwitterGeoProcessorBootApp { public static void main(String[] args) { SpringApplication.run(MyTwitterGeoProcessorBootApp.class, - "--spring.cloud.stream.function.definition=messageToGeoQueryFunction|twitterSearchPlacesFunction|managedJson"); + "--spring.cloud.function.definition=messageToGeoQueryFunction|twitterSearchPlacesFunction|managedJson"); } } ----