From fe37df26f895f2a2c27f310b5e1e106bba187a64 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 18 Apr 2016 16:43:56 +0100 Subject: [PATCH] Remove references to redis binder --- ...gframework.boot.cli.command.CommandFactory | 1 - ...oot.cli.compiler.CompilerAutoConfiguration | 12 ------ ...t.cli.compiler.SpringBootAstTransformation | 1 - .../boot/groovy/cloud/EnableBinding.java | 6 +-- .../BaseStreamCompilerAutoConfiguration.java | 8 ++-- .../StreamRedisCompilerAutoConfiguration.java | 39 ------------------- ...oot.cli.compiler.CompilerAutoConfiguration | 1 - 7 files changed, 8 insertions(+), 60 deletions(-) delete mode 100644 spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.command.CommandFactory delete mode 100644 spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration delete mode 100644 spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation delete mode 100644 spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/StreamRedisCompilerAutoConfiguration.java diff --git a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.command.CommandFactory b/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.command.CommandFactory deleted file mode 100644 index d7b5678..0000000 --- a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.command.CommandFactory +++ /dev/null @@ -1 +0,0 @@ -org.springframework.cloud.cli.command.CloudCommandFactory diff --git a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration b/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration deleted file mode 100644 index 1c2eb57..0000000 --- a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration +++ /dev/null @@ -1,12 +0,0 @@ -org.springframework.cloud.cli.compiler.SpringCloudCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.ConfigServerCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.EurekaClientCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.EurekaServerCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.HystrixCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.HystrixDashboardCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.OAuth2LoadBalancedCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.RibbonClientCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.StreamKafkaCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.StreamRabbitCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.StreamRedisCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.ZuulCompilerAutoConfiguration diff --git a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation b/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation deleted file mode 100644 index accdfba..0000000 --- a/spring-cloud-cli-integration-tests/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation +++ /dev/null @@ -1 +0,0 @@ -org.springframework.cloud.cli.compiler.SpringCloudBomAstTransformation \ No newline at end of file diff --git a/spring-cloud-cli/src/main/java/org/springframework/boot/groovy/cloud/EnableBinding.java b/spring-cloud-cli/src/main/java/org/springframework/boot/groovy/cloud/EnableBinding.java index 5519ef8..4838f7e 100644 --- a/spring-cloud-cli/src/main/java/org/springframework/boot/groovy/cloud/EnableBinding.java +++ b/spring-cloud-cli/src/main/java/org/springframework/boot/groovy/cloud/EnableBinding.java @@ -35,8 +35,8 @@ import org.springframework.core.annotation.AliasFor; @org.springframework.cloud.stream.annotation.EnableBinding public @interface EnableBinding { - @AliasFor(annotation=org.springframework.cloud.stream.annotation.EnableBinding.class, attribute="value") - Class[]value() default {}; + @AliasFor(annotation = org.springframework.cloud.stream.annotation.EnableBinding.class, attribute = "value") + Class[] value() default {}; - String transport() default "redis"; + String transport() default "rabbit"; } diff --git a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/BaseStreamCompilerAutoConfiguration.java b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/BaseStreamCompilerAutoConfiguration.java index 176db70..101a253 100644 --- a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/BaseStreamCompilerAutoConfiguration.java +++ b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/BaseStreamCompilerAutoConfiguration.java @@ -30,7 +30,8 @@ import org.springframework.util.SystemPropertyUtils; * @author Dave Syer * */ -public abstract class BaseStreamCompilerAutoConfiguration extends CompilerAutoConfiguration { +public abstract class BaseStreamCompilerAutoConfiguration + extends CompilerAutoConfiguration { private SpringIntegrationCompilerAutoConfiguration integration = new SpringIntegrationCompilerAutoConfiguration(); @@ -48,7 +49,7 @@ public abstract class BaseStreamCompilerAutoConfiguration extends CompilerAutoCo if (PatternMatchUtils.simpleMatch(annotation, annotationNode.getClassNode().getName())) { Expression expression = annotationNode.getMembers().get("transport"); - String transport = expression == null ? "redis" : expression.getText(); + String transport = expression == null ? "rabbit" : expression.getText(); if (transport != null) { transport = SystemPropertyUtils.resolvePlaceholders(transport); } @@ -62,7 +63,8 @@ public abstract class BaseStreamCompilerAutoConfiguration extends CompilerAutoCo public void applyImports(ImportCustomizer imports) throws CompilationFailedException { this.integration.applyImports(imports); imports.addImports("org.springframework.boot.groovy.cloud.EnableBinding"); - imports.addImport("IntegrationMessageSource", "org.springframework.integration.core.MessageSource"); + imports.addImport("IntegrationMessageSource", + "org.springframework.integration.core.MessageSource"); imports.addStarImports("org.springframework.cloud.stream.annotation", "org.springframework.cloud.stream.messaging"); } diff --git a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/StreamRedisCompilerAutoConfiguration.java b/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/StreamRedisCompilerAutoConfiguration.java deleted file mode 100644 index a379244..0000000 --- a/spring-cloud-cli/src/main/java/org/springframework/cloud/cli/compiler/StreamRedisCompilerAutoConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2013-2014 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 - * - * http://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.cli.compiler; - -import org.springframework.boot.cli.compiler.DependencyCustomizer; - -/** - * @author Dave Syer - * - */ -public class StreamRedisCompilerAutoConfiguration - extends BaseStreamCompilerAutoConfiguration { - - @Override - protected String getTransport() { - return "redis"; - } - - @Override - public void applyDependencies(DependencyCustomizer dependencies) { - dependencies - .ifAnyMissingClasses( - "org.springframework.cloud.stream.binder.redis.config.RedisServiceAutoConfiguration") - .add("spring-cloud-starter-stream-redis"); - } -} diff --git a/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration b/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration index 1c2eb57..4dfc5d6 100644 --- a/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration +++ b/spring-cloud-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration @@ -8,5 +8,4 @@ org.springframework.cloud.cli.compiler.OAuth2LoadBalancedCompilerAutoConfigurati org.springframework.cloud.cli.compiler.RibbonClientCompilerAutoConfiguration org.springframework.cloud.cli.compiler.StreamKafkaCompilerAutoConfiguration org.springframework.cloud.cli.compiler.StreamRabbitCompilerAutoConfiguration -org.springframework.cloud.cli.compiler.StreamRedisCompilerAutoConfiguration org.springframework.cloud.cli.compiler.ZuulCompilerAutoConfiguration