You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2017/03/25 22:35:30 UTC
[2/2] camel git commit: Make camel-http4 the default for service-call
as camel-http has been deprecated
Make camel-http4 the default for service-call as camel-http has been deprecated
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/afca0b70
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/afca0b70
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/afca0b70
Branch: refs/heads/master
Commit: afca0b7002f3ea734c823e8c6bd2eb7a455a7795
Parents: 6db3f45
Author: lburgazzoli <lb...@gmail.com>
Authored: Sat Mar 25 23:35:02 2017 +0100
Committer: lburgazzoli <lb...@gmail.com>
Committed: Sat Mar 25 23:35:02 2017 +0100
----------------------------------------------------------------------
.../impl/cloud/DefaultServiceCallExpression.java | 14 +++++++-------
.../camel/model/cloud/ServiceCallConstants.java | 2 +-
components/camel-consul/pom.xml | 2 +-
components/camel-etcd/pom.xml | 2 +-
components/camel-kubernetes/pom.xml | 2 +-
components/camel-ribbon/pom.xml | 2 +-
.../CamelCloudServiceDiscoveryAutoConfiguration.java | 2 ++
.../CamelCloudServiceFilterAutoConfiguration.java | 2 ++
components/camel-spring-cloud-netflix/pom.xml | 2 +-
components/camel-spring-cloud/pom.xml | 2 +-
10 files changed, 18 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceCallExpression.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceCallExpression.java b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceCallExpression.java
index 1279baf..e1c49f7 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceCallExpression.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceCallExpression.java
@@ -26,10 +26,10 @@ import org.slf4j.LoggerFactory;
* <p/>
* Below are some examples how to call a service and what Camel endpoint URI is constructed based on the input:
* <pre>
- serviceCall("myService") -> http://hostname:port
- serviceCall("myService/foo") -> http://hostname:port/foo
- serviceCall("http:myService/foo") -> http:hostname:port/foo
- serviceCall("myService", "http:myService.host:myService.port/foo") -> http:hostname:port/foo
+ serviceCall("myService") -> http4://hostname:port
+ serviceCall("myService/foo") -> http4://hostname:port/foo
+ serviceCall("http4:myService/foo") -> http4:hostname:port/foo
+ serviceCall("myService", "http4:myService.host:myService.port/foo") -> http4:hostname:port/foo
serviceCall("myService", "netty4:tcp:myService?connectTimeout=1000") -> netty:tcp:hostname:port?connectTimeout=1000
* </pre>
*/
@@ -44,11 +44,11 @@ public class DefaultServiceCallExpression extends ServiceCallExpressionSupport {
if (scheme == null) {
// use http/https by default if no scheme or port have been configured
if (port == null) {
- scheme = "http";
+ scheme = "http4";
} else if (port == 443) {
- scheme = "https";
+ scheme = "https4";
} else {
- scheme = "http";
+ scheme = "http4";
}
}
answer = scheme + "://" + host;
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConstants.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConstants.java b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConstants.java
index 4cc89f1..8859f33 100644
--- a/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConstants.java
+++ b/camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConstants.java
@@ -17,7 +17,7 @@
package org.apache.camel.model.cloud;
public final class ServiceCallConstants {
- public static final String DEFAULT_COMPONENT = "http";
+ public static final String DEFAULT_COMPONENT = "http4";
public static final String DEFAULT_SERVICE_CALL_CONFIG_ID = "service-call-configuration";
public static final String DEFAULT_SERVICE_CALL_EXPRESSION_ID = "service-call-expression";
public static final String DEFAULT_SERVICE_DISCOVERY_ID = "service-discovery";
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-consul/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-consul/pom.xml b/components/camel-consul/pom.xml
index 133d2ff..dd1a4d3 100644
--- a/components/camel-consul/pom.xml
+++ b/components/camel-consul/pom.xml
@@ -64,7 +64,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-etcd/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-etcd/pom.xml b/components/camel-etcd/pom.xml
index cec4db5..9136f98 100644
--- a/components/camel-etcd/pom.xml
+++ b/components/camel-etcd/pom.xml
@@ -88,7 +88,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-kubernetes/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/pom.xml b/components/camel-kubernetes/pom.xml
index 2be203e..ad97c42 100644
--- a/components/camel-kubernetes/pom.xml
+++ b/components/camel-kubernetes/pom.xml
@@ -57,7 +57,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-ribbon/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-ribbon/pom.xml b/components/camel-ribbon/pom.xml
index 3786e37..7ad8c5e 100644
--- a/components/camel-ribbon/pom.xml
+++ b/components/camel-ribbon/pom.xml
@@ -65,7 +65,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java
index 06ef3d7..02b3c34 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java
@@ -36,6 +36,7 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
@@ -43,6 +44,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
@Configuration
+@ConditionalOnBean(CamelCloudAutoConfiguration.class)
@EnableConfigurationProperties(CamelCloudConfigurationProperties.class)
@Conditional(CamelCloudServiceDiscoveryAutoConfiguration.Condition.class)
public class CamelCloudServiceDiscoveryAutoConfiguration implements BeanFactoryAware {
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceFilterAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceFilterAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceFilterAutoConfiguration.java
index f3b7866..eea3e6a 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceFilterAutoConfiguration.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/cloud/CamelCloudServiceFilterAutoConfiguration.java
@@ -35,6 +35,7 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
@@ -42,6 +43,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
@Configuration
+@ConditionalOnBean(CamelCloudAutoConfiguration.class)
@EnableConfigurationProperties(CamelCloudConfigurationProperties.class)
@Conditional(CamelCloudServiceFilterAutoConfiguration.Condition.class)
public class CamelCloudServiceFilterAutoConfiguration implements BeanFactoryAware {
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-spring-cloud-netflix/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring-cloud-netflix/pom.xml b/components/camel-spring-cloud-netflix/pom.xml
index 5d6ca11..0b1d31f 100644
--- a/components/camel-spring-cloud-netflix/pom.xml
+++ b/components/camel-spring-cloud-netflix/pom.xml
@@ -77,7 +77,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/camel/blob/afca0b70/components/camel-spring-cloud/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring-cloud/pom.xml b/components/camel-spring-cloud/pom.xml
index c57bcff..0b96b57 100644
--- a/components/camel-spring-cloud/pom.xml
+++ b/components/camel-spring-cloud/pom.xml
@@ -73,7 +73,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
+ <artifactId>camel-http4</artifactId>
<scope>test</scope>
</dependency>
<dependency>