diff --git a/spring-boot-autoconfigure/pom.xml b/spring-boot-autoconfigure/pom.xml index 7e88dd26f7e..93b509bfa5a 100755 --- a/spring-boot-autoconfigure/pom.xml +++ b/spring-boot-autoconfigure/pom.xml @@ -105,11 +105,6 @@ cache-api true - - io.projectreactor.spring - reactor-spring-context - true - io.searchbox jest @@ -645,6 +640,11 @@ transactions-jms test + + com.jayway.jsonpath + json-path + test + mysql mysql-connector-java diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfiguration.java deleted file mode 100644 index 803e1a5ce13..00000000000 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfiguration.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2012-2015 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.boot.autoconfigure.reactor; - -import reactor.Environment; -import reactor.bus.EventBus; -import reactor.spring.context.config.EnableReactor; - -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * {@link EnableAutoConfiguration Auto-configuration} for Reactor. - * - * @author Dave Syer - */ -@Configuration -@ConditionalOnClass({ EnableReactor.class, Environment.class }) -@AutoConfigureAfter(WebMvcAutoConfiguration.class) -public class ReactorAutoConfiguration { - - @Bean - @ConditionalOnMissingBean(EventBus.class) - public EventBus eventBus(Environment environment) { - return EventBus.create(environment); - } - - @Configuration - @ConditionalOnMissingBean(Environment.class) - @EnableReactor - protected static class ReactorConfiguration { - - } - -} diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/package-info.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/package-info.java deleted file mode 100644 index 71abca8d5a6..00000000000 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2012-2015 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. - */ - -/** - * Auto-configuration for Project Reactor. - */ -package org.springframework.boot.autoconfigure.reactor; diff --git a/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories b/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories index 03e96c9a9a9..a453a0cd8ff 100644 --- a/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories +++ b/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories @@ -72,7 +72,6 @@ org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfigura org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration,\ org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration,\ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\ -org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration,\ org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration,\ org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration,\ org.springframework.boot.autoconfigure.security.FallbackWebSecurityAutoConfiguration,\ diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfigurationTests.java deleted file mode 100644 index ef562c1a2a9..00000000000 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfigurationTests.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2012-2016 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.boot.autoconfigure.reactor; - -import org.junit.Test; -import reactor.bus.EventBus; -import reactor.core.Dispatcher; -import reactor.core.dispatch.MpscDispatcher; -import reactor.core.dispatch.RingBufferDispatcher; - -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Tests for {@link ReactorAutoConfiguration}. - * - * @author Dave Syer - * @author Andy Wilkinson - */ -public class ReactorAutoConfigurationTests { - - private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); - - @Test - public void eventBusIsAvailable() { - this.context.register(ReactorAutoConfiguration.class); - this.context.refresh(); - EventBus eventBus = this.context.getBean(EventBus.class); - assertThat(eventBus.getDispatcher()).isInstanceOf(RingBufferDispatcher.class); - this.context.close(); - } - - @Test - public void customEventBus() { - this.context.register(TestConfiguration.class, ReactorAutoConfiguration.class); - this.context.refresh(); - EventBus eventBus = this.context.getBean(EventBus.class); - assertThat(eventBus.getDispatcher()).isInstanceOf(MpscDispatcher.class); - this.context.close(); - } - - @Configuration - protected static class TestConfiguration { - - @Bean(destroyMethod = "shutdown") - public Dispatcher dispatcher() { - return new MpscDispatcher("test"); - } - - @Bean - public EventBus customEventBus() { - return EventBus.create(dispatcher()); - } - } - -} diff --git a/spring-boot-cli/samples/reactor.groovy b/spring-boot-cli/samples/reactor.groovy deleted file mode 100644 index 41b4f0c286a..00000000000 --- a/spring-boot-cli/samples/reactor.groovy +++ /dev/null @@ -1,48 +0,0 @@ -package org.test - -import java.util.concurrent.CountDownLatch - -@EnableReactor -@Log -class Runner implements CommandLineRunner { - - @Autowired - EventBus eventBus - - private CountDownLatch latch = new CountDownLatch(1) - - @PostConstruct - void init() { - log.info "Registering consumer" - } - - void run(String... args) { - eventBus.notify("hello", Event.wrap("Phil")) - log.info "Notified Phil" - latch.await() - } - - @Bean - CountDownLatch latch() { - latch - } - -} - -@Consumer -@Log -class Greeter { - - @Autowired - EventBus eventBus - - @Autowired - private CountDownLatch latch - - @Selector(value="hello") - void receive(String data) { - log.info "Hello ${data}" - latch.countDown() - } - -} \ No newline at end of file diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java deleted file mode 100644 index 52603880b23..00000000000 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2012-2015 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.boot.cli.compiler.autoconfigure; - -import org.codehaus.groovy.ast.ClassNode; -import org.codehaus.groovy.control.customizers.ImportCustomizer; - -import org.springframework.boot.cli.compiler.AstUtils; -import org.springframework.boot.cli.compiler.CompilerAutoConfiguration; -import org.springframework.boot.cli.compiler.DependencyCustomizer; - -/** - * {@link CompilerAutoConfiguration} for the Reactor. - * - * @author Dave Syer - */ -public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration { - - @Override - public boolean matches(ClassNode classNode) { - return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableReactor") - || AstUtils.hasAtLeastOneFieldOrMethod(classNode, "EventBus"); - } - - @Override - public void applyDependencies(DependencyCustomizer dependencies) { - dependencies.ifAnyMissingClasses("reactor.bus.EventBus") - .add("reactor-spring-context", false).add("reactor-spring-core", false) - .add("reactor-bus").add("reactor-stream"); - } - - @Override - public void applyImports(ImportCustomizer imports) { - imports.addImports("reactor.bus.Bus", "reactor.bus.Event", "reactor.bus.EventBus", - "reactor.fn.Function", "reactor.fn.Functions", "reactor.fn.Predicate", - "reactor.fn.Predicates", "reactor.fn.Supplier", "reactor.fn.Suppliers", - "reactor.spring.context.annotation.Consumer", - "reactor.spring.context.annotation.ReplyTo", - "reactor.spring.context.annotation.Selector", - "reactor.spring.context.annotation.SelectorType", - "reactor.spring.context.config.EnableReactor") - .addStarImports("reactor.bus.selector.Selectors") - .addImport("ReactorEnvironment", "reactor.Environment"); - } - -} diff --git a/spring-boot-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration b/spring-boot-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration index abf16994987..ca13e5d6e3c 100644 --- a/spring-boot-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration +++ b/spring-boot-cli/src/main/resources/META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration @@ -3,7 +3,6 @@ org.springframework.boot.cli.compiler.autoconfigure.GroovyTemplatesCompilerAutoC org.springframework.boot.cli.compiler.autoconfigure.SpringMvcCompilerAutoConfiguration org.springframework.boot.cli.compiler.autoconfigure.SpringBatchCompilerAutoConfiguration org.springframework.boot.cli.compiler.autoconfigure.RabbitCompilerAutoConfiguration -org.springframework.boot.cli.compiler.autoconfigure.ReactorCompilerAutoConfiguration org.springframework.boot.cli.compiler.autoconfigure.CachingCompilerAutoConfiguration org.springframework.boot.cli.compiler.autoconfigure.JdbcCompilerAutoConfiguration org.springframework.boot.cli.compiler.autoconfigure.JmsCompilerAutoConfiguration diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java index cdf05b84147..3bf03fd8b23 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java @@ -78,17 +78,6 @@ public class SampleIntegrationTests { assertThat(output).contains("security.oauth2.client.secret ="); } - @Test - public void reactorSample() throws Exception { - String output = this.cli.run("reactor.groovy", "Phil"); - int count = 0; - while (!output.contains("Hello Phil") && count++ < 5) { - Thread.sleep(200); - output = this.cli.getOutput(); - } - assertThat(output).contains("Hello Phil"); - } - @Test public void jobWebSample() throws Exception { String output = this.cli.run("job.groovy", "web.groovy", "foo=bar"); diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java index a9011272a8d..bc40767515a 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/TestCommandIntegrationTests.java @@ -96,7 +96,7 @@ public class TestCommandIntegrationTests { @Test public void integrationAutoConfigTest() throws Exception { - String output = this.cli.test("integration_auto_test.groovy", "reactor.groovy"); + String output = this.cli.test("integration_auto_test.groovy", "jms.groovy"); assertThat(output).contains("OK (1 test)"); } diff --git a/spring-boot-cli/test-samples/integration_auto_test.groovy b/spring-boot-cli/test-samples/integration_auto_test.groovy index a90e979fa47..91e22e28ca7 100644 --- a/spring-boot-cli/test-samples/integration_auto_test.groovy +++ b/spring-boot-cli/test-samples/integration_auto_test.groovy @@ -1,12 +1,14 @@ -@SpringBootTest(classes=ReactorApplication, webEnvironment=WebEnvironment.RANDOM_PORT) -class RestTests { +import org.springframework.jms.core.JmsTemplate + +@SpringBootTest(classes=JmsExample) +class JmsTests { @Autowired - EventBus eventBus + JmsTemplate jmsTemplate @Test void test() { - assertNotNull(eventBus) + assertNotNull(jmsTemplate) } } diff --git a/spring-boot-cli/test-samples/jms.groovy b/spring-boot-cli/test-samples/jms.groovy new file mode 100644 index 00000000000..526eeaae6d3 --- /dev/null +++ b/spring-boot-cli/test-samples/jms.groovy @@ -0,0 +1,31 @@ +@Grab("spring-boot-starter-artemis") +@Grab("artemis-jms-server") +import java.util.concurrent.CountDownLatch + +@Log +@Configuration +@EnableJms +class JmsExample implements CommandLineRunner { + + private CountDownLatch latch = new CountDownLatch(1) + + @Autowired + JmsTemplate jmsTemplate + + void run(String... args) { + def messageCreator = { session -> + session.createObjectMessage("Greetings from Spring Boot via Artemis") + } as MessageCreator + log.info "Sending JMS message..." + jmsTemplate.send("spring-boot", messageCreator) + log.info "Send JMS message, waiting..." + latch.await() + } + + @JmsListener(destination = 'spring-boot') + def receive(String message) { + log.info "Received ${message}" + latch.countDown() + } + +} diff --git a/spring-boot-cli/test-samples/reactor.groovy b/spring-boot-cli/test-samples/reactor.groovy deleted file mode 100644 index d009bc6aa9c..00000000000 --- a/spring-boot-cli/test-samples/reactor.groovy +++ /dev/null @@ -1,4 +0,0 @@ -@Configuration -@EnableReactor -class ReactorApplication { -} diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index 263492e7fb0..63594cb213a 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -134,8 +134,7 @@ 2.0.5 9.4.1212.jre7 4.1.4 - 2.0.8.RELEASE - 2.0.7.RELEASE + 3.0.3.RELEASE 2.53.1 2.2.2 3.1.0 @@ -150,8 +149,7 @@ 3.0.7.RELEASE Ingalls-M1 0.21.0.RELEASE - 4.3.5.BUILD-SNAPSHOT - 1.2.0.RELEASE + 5.0.0.BUILD-SNAPSHOT 1.2.6.RELEASE 1.1.5.RELEASE 1.2.0.RELEASE @@ -862,61 +860,11 @@ metrics-servlets ${dropwizard-metrics.version} - - io.projectreactor - reactor-bus - ${reactor.version} - io.projectreactor reactor-core ${reactor.version} - - io.projectreactor - reactor-groovy - ${reactor.version} - - - io.projectreactor - reactor-groovy-extensions - ${reactor.version} - - - io.projectreactor - reactor-logback - ${reactor.version} - - - io.projectreactor - reactor-net - ${reactor.version} - - - io.projectreactor - reactor-stream - ${reactor.version} - - - io.projectreactor.spring - reactor-spring-context - ${reactor-spring.version} - - - io.projectreactor.spring - reactor-spring-core - ${reactor-spring.version} - - - io.projectreactor.spring - reactor-spring-messaging - ${reactor-spring.version} - - - io.projectreactor.spring - reactor-spring-webmvc - ${reactor-spring.version} - io.searchbox jest @@ -2088,11 +2036,6 @@ - - org.springframework.integration - spring-integration-java-dsl - ${spring-integration-java-dsl.version} - org.springframework.mobile spring-mobile-device diff --git a/spring-boot-docs/pom.xml b/spring-boot-docs/pom.xml index a4b664d05f7..b3bd8b073d6 100644 --- a/spring-boot-docs/pom.xml +++ b/spring-boot-docs/pom.xml @@ -162,11 +162,6 @@ metrics-core true - - io.projectreactor.spring - reactor-spring-context - true - io.undertow undertow-servlet diff --git a/spring-boot-samples/spring-boot-sample-integration/src/main/java/sample/integration/SampleIntegrationApplication.java b/spring-boot-samples/spring-boot-sample-integration/src/main/java/sample/integration/SampleIntegrationApplication.java index a893f386d5a..07506b953ae 100644 --- a/spring-boot-samples/spring-boot-sample-integration/src/main/java/sample/integration/SampleIntegrationApplication.java +++ b/spring-boot-samples/spring-boot-sample-integration/src/main/java/sample/integration/SampleIntegrationApplication.java @@ -17,6 +17,7 @@ package sample.integration; import java.io.File; +import java.util.function.Consumer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -25,9 +26,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.Pollers; import org.springframework.integration.dsl.SourcePollingChannelAdapterSpec; -import org.springframework.integration.dsl.core.Pollers; -import org.springframework.integration.dsl.support.Consumer; import org.springframework.integration.file.FileReadingMessageSource; import org.springframework.integration.file.FileWritingMessageHandler; diff --git a/spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java b/spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java index 9bcdec26cb2..8ad02907fea 100644 --- a/spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java +++ b/spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java @@ -17,6 +17,7 @@ package sample.parent; import java.io.File; +import java.util.function.Consumer; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -26,9 +27,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.dsl.IntegrationFlows; +import org.springframework.integration.dsl.Pollers; import org.springframework.integration.dsl.SourcePollingChannelAdapterSpec; -import org.springframework.integration.dsl.core.Pollers; -import org.springframework.integration.dsl.support.Consumer; import org.springframework.integration.file.FileReadingMessageSource; import org.springframework.integration.file.FileWritingMessageHandler; diff --git a/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java b/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java index 5251b2f7af9..0600c31ac27 100644 --- a/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-parent-context/src/test/java/sample/parent/consumer/SampleIntegrationParentApplicationTests.java @@ -88,7 +88,7 @@ public class SampleIntegrationParentApplicationTests { private Resource[] findResources() throws IOException { return ResourcePatternUtils .getResourcePatternResolver(new DefaultResourceLoader()) - .getResources("file:target/output/**/*.msg"); + .getResources("file:target/output/*.txt"); } private String readResources(Resource[] resources) throws IOException { diff --git a/spring-boot-starters/spring-boot-starter-integration/pom.xml b/spring-boot-starters/spring-boot-starter-integration/pom.xml index 159640e69f3..8a6f1caad5b 100644 --- a/spring-boot-starters/spring-boot-starter-integration/pom.xml +++ b/spring-boot-starters/spring-boot-starter-integration/pom.xml @@ -30,10 +30,6 @@ org.springframework.integration spring-integration-core - - org.springframework.integration - spring-integration-java-dsl - org.springframework.integration spring-integration-jmx