You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/10/05 10:03:41 UTC

[camel] 09/09: Upgrade Spring Boot to 2.1.0.M4

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch java-10-test
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0dd568a2535824a6ca8f177a54bb658add498a23
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Sep 24 21:39:17 2018 +0200

    Upgrade Spring Boot to 2.1.0.M4
---
 .../org/apache/camel/http/common/CamelServlet.java |  1 -
 components/camel-spring-boot/pom.xml               |  6 ++++++
 .../cloud/CamelCloudConfigurationProperties.java   |  2 --
 .../boot/CamelAutoConfigurationPropertiesTest.java |  2 +-
 .../boot/CamelConfigurationLocationsTest.java      |  2 +-
 .../camel/spring/boot/CamelEventNotifierTest.java  |  2 +-
 .../boot/CustomCamelCamelConfigurationTest.java    |  2 +-
 .../spring/boot/CustomShutdownStrategyTest.java    |  2 +-
 .../spring/boot/SpringConverterDelegationTest.java |  2 +-
 .../camel/spring/boot/issues/RestDslPostTest.java  |  2 +-
 .../camel/spring/boot/issues/SimpleOgnlTest.java   |  2 +-
 .../boot/parent/SpringBootRefreshContextTest.java  |  5 +++--
 parent/pom.xml                                     |  2 +-
 pom.xml                                            | 24 ++++++++++++++++++++++
 14 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
index 2b12a62..c7db0b2 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/CamelServlet.java
@@ -23,7 +23,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.stream.Collector;
 import java.util.stream.Collectors;
 import javax.servlet.AsyncContext;
 import javax.servlet.ServletConfig;
diff --git a/components/camel-spring-boot/pom.xml b/components/camel-spring-boot/pom.xml
index e2a7028..4ddb7f3 100644
--- a/components/camel-spring-boot/pom.xml
+++ b/components/camel-spring-boot/pom.xml
@@ -129,6 +129,12 @@
       <artifactId>camel-http4</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>javax.activation</groupId>
+      <artifactId>javax.activation-api</artifactId>
+      <version>${activation-api-version}</version>
+      <scope>test</scope>
+    </dependency>
 
   </dependencies>
 
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudConfigurationProperties.java
index 20c83a7..51a8baa 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudConfigurationProperties.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudConfigurationProperties.java
@@ -20,8 +20,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.Expression;
-import org.apache.camel.cloud.ServiceLoadBalancer;
 import org.apache.camel.model.cloud.ServiceCallDefinitionConstants;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelAutoConfigurationPropertiesTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelAutoConfigurationPropertiesTest.java
index 4f15180..15de030 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelAutoConfigurationPropertiesTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelAutoConfigurationPropertiesTest.java
@@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = CamelAutoConfigurationPropertiesTest.class, properties = "camel.springboot.jmxEnabled=false")
+@SpringBootTest(properties = "camel.springboot.jmxEnabled=false")
 public class CamelAutoConfigurationPropertiesTest extends Assert {
 
     // Route fixtures
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelConfigurationLocationsTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelConfigurationLocationsTest.java
index 82f61bc..c8b68dd 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelConfigurationLocationsTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelConfigurationLocationsTest.java
@@ -33,7 +33,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = CamelConfigurationLocationsTest.class, properties = "camel.springboot.file-configurations=file:src/test/secret/*.properties")
+@SpringBootTest(properties = "camel.springboot.file-configurations=file:src/test/secret/*.properties")
 public class CamelConfigurationLocationsTest extends Assert {
 
     @Configuration
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelEventNotifierTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelEventNotifierTest.java
index 397c989..3012356 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelEventNotifierTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CamelEventNotifierTest.java
@@ -39,7 +39,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = CamelEventNotifierTest.class)
+@SpringBootTest
 public class CamelEventNotifierTest extends Assert {
 
     @Configuration
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomCamelCamelConfigurationTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomCamelCamelConfigurationTest.java
index 42fcdf9..24ba9c9 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomCamelCamelConfigurationTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomCamelCamelConfigurationTest.java
@@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = CustomCamelCamelConfigurationTest.class)
+@SpringBootTest
 public class CustomCamelCamelConfigurationTest extends Assert {
 
     @Configuration
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomShutdownStrategyTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomShutdownStrategyTest.java
index bdf8d80..fb2aea4 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomShutdownStrategyTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/CustomShutdownStrategyTest.java
@@ -38,7 +38,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = CustomShutdownStrategyTest.class)
+@SpringBootTest
 public class CustomShutdownStrategyTest extends Assert {
 
     @Autowired
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringConverterDelegationTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringConverterDelegationTest.java
index 83c3332..3dae2cc 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringConverterDelegationTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/SpringConverterDelegationTest.java
@@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 @DirtiesContext
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = SpringConverterDelegationTest.class, properties = "camel.springboot.typeConversion=true")
+@SpringBootTest(properties = "camel.springboot.typeConversion=true")
 public class SpringConverterDelegationTest extends Assert {
 
     @Autowired
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/RestDslPostTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/RestDslPostTest.java
index 6d835b8..145cee9 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/RestDslPostTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/RestDslPostTest.java
@@ -39,7 +39,7 @@ import org.springframework.util.SocketUtils;
 
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = { RestDslPostTest.class })
+@SpringBootTest
 public class RestDslPostTest extends Assert {
 
     static final int PORT = SocketUtils.findAvailableTcpPort(20000);
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/SimpleOgnlTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/SimpleOgnlTest.java
index 87148cd..45afd46 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/SimpleOgnlTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/issues/SimpleOgnlTest.java
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 
 @RunWith(SpringRunner.class)
 @EnableAutoConfiguration
-@SpringBootTest(classes = { SimpleOgnlTest.class })
+@SpringBootTest
 public class SimpleOgnlTest {
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/parent/SpringBootRefreshContextTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/parent/SpringBootRefreshContextTest.java
index d1adfcf..b658122 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/parent/SpringBootRefreshContextTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/parent/SpringBootRefreshContextTest.java
@@ -20,6 +20,7 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.boot.RoutesCollector;
 import org.junit.Test;
+import org.springframework.boot.WebApplicationType;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.context.ConfigurableApplicationContext;
@@ -33,7 +34,7 @@ public class SpringBootRefreshContextTest {
     public void shouldOnlyCollectRoutesOnce() {
         GenericApplicationContext parent = new GenericApplicationContext();
         parent.refresh();
-        ConfigurableApplicationContext context = new SpringApplicationBuilder(Configuration.class).web(false).parent(parent).run();
+        ConfigurableApplicationContext context = new SpringApplicationBuilder(Configuration.class).web(WebApplicationType.NONE).parent(parent).run();
         ContextRefreshedEvent refreshEvent = new ContextRefreshedEvent(context);
         RoutesCollector collector = context.getBean(RoutesCollector.class);
         collector.onApplicationEvent(refreshEvent); //no changes should happen here
@@ -54,4 +55,4 @@ class Configuration {
         };
     }
 
-}
\ No newline at end of file
+}
diff --git a/parent/pom.xml b/parent/pom.xml
index 7c25dfc..d767b2c 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -639,7 +639,7 @@
     <splunk-version>1.6.4.0_1</splunk-version>
     <spring-batch-version>4.0.1.RELEASE</spring-batch-version>
     <spring-batch-bundle-version>4.0.1.RELEASE_1</spring-batch-bundle-version>
-    <spring-boot-version>2.0.5.RELEASE</spring-boot-version>
+    <spring-boot-version>2.1.0.M4</spring-boot-version>
     <spring-cloud-commons-version>2.0.1.RELEASE</spring-cloud-commons-version>
     <spring-cloud-consul-version>2.0.1.RELEASE</spring-cloud-consul-version>
     <spring-cloud-netflix-version>2.0.1.RELEASE</spring-cloud-netflix-version>
diff --git a/pom.xml b/pom.xml
index 75f1a2b..9cea9fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -125,6 +125,19 @@
         <enabled>false</enabled>
       </releases>
     </repository>
+    <!-- for Java 11 support we need Spring milestone releases,
+         to be removed when released -->
+    <repository>
+      <id>spring.milestone</id>
+      <url>https://repo.spring.io/milestone/</url>
+      <name>Spring Milestone repository</name>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+    </repository>
   </repositories>
 
   <pluginRepositories>
@@ -161,6 +174,17 @@
         <enabled>true</enabled>
       </releases>
     </pluginRepository>
+    <pluginRepository>
+      <id>spring.milestone</id>
+      <url>https://repo.spring.io/milestone/</url>
+      <name>Spring Milestone repository</name>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+    </pluginRepository>
   </pluginRepositories>
 
   <modules>