This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit bebdd679baad653e6e72b7c8c4d5a9b586d194af Author: Claus Ibsen <[email protected]> AuthorDate: Wed Aug 1 14:31:28 2018 +0200 CAMEL-12702: Improved spring boot docs --- .../src/main/docs/spring-boot.adoc | 36 ++++++++-------- .../cloud/CamelCloudConfigurationProperties.java | 49 +++++++++++++++++----- 2 files changed, 57 insertions(+), 28 deletions(-) diff --git a/components/camel-spring-boot/src/main/docs/spring-boot.adoc b/components/camel-spring-boot/src/main/docs/spring-boot.adoc index 1f3690c..2607825 100644 --- a/components/camel-spring-boot/src/main/docs/spring-boot.adoc +++ b/components/camel-spring-boot/src/main/docs/spring-boot.adoc @@ -86,25 +86,25 @@ The component supports 139 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *camel.cloud.enabled* | | true | Boolean -| *camel.cloud.load-balancer.enabled* | | true | Boolean -| *camel.cloud.service-call.component* | The component to use. | | String +| *camel.cloud.enabled* | Global option to enable/disable Camel cloud support, default is true. | true | Boolean +| *camel.cloud.load-balancer.enabled* | Global option to enable/disable Camel cloud load balancer, default is true. | true | Boolean +| *camel.cloud.service-call.component* | The Camel component to use for calling the service. The default is http4 component. | | String | *camel.cloud.service-call.default-load-balancer* | Determine if the default load balancer should be used instead of any auto discovered one. | false | Boolean -| *camel.cloud.service-call.expression* | The {@link Expression} to use. | | String -| *camel.cloud.service-call.expression-language* | The {@link Expression} language to use, default is ref | ref | String -| *camel.cloud.service-call.load-balancer* | A reference to the {@link ServiceLoadBalancer} to use. | | String -| *camel.cloud.service-call.service-chooser* | A reference to the {@link org.apache.camel.cloud.ServiceChooser} to use. | | String -| *camel.cloud.service-call.service-discovery* | A reference to the {@link org.apache.camel.cloud.ServiceDiscovery} to use. | | String -| *camel.cloud.service-call.service-filter* | A reference to the {@link org.apache.camel.cloud.ServiceFilter} to use. | | String -| *camel.cloud.service-call.uri* | The uri of the endpoint to send to. The uri can be dynamic computed using the {@link org.apache.camel.language.simple.SimpleLanguage} expression. | | String -| *camel.cloud.service-chooser.enabled* | | true | Boolean -| *camel.cloud.service-discovery.cache-timeout* | | | String -| *camel.cloud.service-discovery.configurations* | | | Map -| *camel.cloud.service-discovery.enabled* | | true | Boolean -| *camel.cloud.service-discovery.services* | | | Map -| *camel.cloud.service-filter.blacklist* | | | Map -| *camel.cloud.service-filter.configurations* | | | Map -| *camel.cloud.service-filter.enabled* | | true | Boolean +| *camel.cloud.service-call.expression* | The expression to use. | | String +| *camel.cloud.service-call.expression-language* | The expression language to use, default is ref. | ref | String +| *camel.cloud.service-call.load-balancer* | A reference to the org.apache.camel.cloud.ServiceLoadBalancer to use. | | String +| *camel.cloud.service-call.service-chooser* | A reference to the org.apache.camel.cloud.ServiceChooser to use. | | String +| *camel.cloud.service-call.service-discovery* | A reference to the org.apache.camel.cloud.ServiceDiscovery to use. | | String +| *camel.cloud.service-call.service-filter* | A reference to the org.apache.camel.cloud.ServiceFilter to use. | | String +| *camel.cloud.service-call.uri* | The uri of the endpoint to send to. The uri can be dynamic computed using the simple language expression. | | String +| *camel.cloud.service-chooser.enabled* | Global option to enable/disable Camel cloud service chooser, default is true. | true | Boolean +| *camel.cloud.service-discovery.cache-timeout* | Configure cache timeout (in millis). | | String +| *camel.cloud.service-discovery.configurations* | Configure the service discovery rules. | | Map +| *camel.cloud.service-discovery.enabled* | Global option to enable/disable Camel cloud service discovery, default is true. | true | Boolean +| *camel.cloud.service-discovery.services* | Configure service discoveries. | | Map +| *camel.cloud.service-filter.blacklist* | Configure service filter blacklists. | | Map +| *camel.cloud.service-filter.configurations* | Configure the service filtering rules. | | Map +| *camel.cloud.service-filter.enabled* | Global option to enable/disable Camel cloud service filter, default is true. | true | Boolean | *camel.cloud.service-registry.enabled* | Configure if service registry should be enabled or not, default true. | true | Boolean | *camel.cloud.service-registry.service-host* | Configure the service listening address. | | String | *camel.clustered.controller.cluster-service* | The cluster service. | | CamelClusterService 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 753bd77..20c83a7 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 @@ -27,6 +27,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "camel.cloud") public class CamelCloudConfigurationProperties { + /** + * Global option to enable/disable Camel cloud support, default is true. + */ private boolean enabled = true; private ServiceCall serviceCall = new ServiceCall(); private LoadBalancer loadBalancer = new LoadBalancer(); @@ -72,34 +75,35 @@ public class CamelCloudConfigurationProperties { // ***************************************** public class ServiceCall { + /** * The uri of the endpoint to send to. - * The uri can be dynamic computed using the {@link org.apache.camel.language.simple.SimpleLanguage} expression. + * The uri can be dynamic computed using the simple language expression. */ private String uri; /** - * The component to use. + * The Camel component to use for calling the service. The default is http4 component. */ private String component = ServiceCallDefinitionConstants.DEFAULT_COMPONENT; /** - * A reference to the {@link org.apache.camel.cloud.ServiceDiscovery} to use. + * A reference to the org.apache.camel.cloud.ServiceDiscovery to use. */ private String serviceDiscovery; /** - * A reference to the {@link org.apache.camel.cloud.ServiceFilter} to use. + * A reference to the org.apache.camel.cloud.ServiceFilter to use. */ private String serviceFilter; /** - * A reference to the {@link org.apache.camel.cloud.ServiceChooser} to use. + * A reference to the org.apache.camel.cloud.ServiceChooser to use. */ private String serviceChooser; /** - * A reference to the {@link ServiceLoadBalancer} to use. + * A reference to the org.apache.camel.cloud.ServiceLoadBalancer to use. */ private String loadBalancer; @@ -109,12 +113,12 @@ public class CamelCloudConfigurationProperties { private boolean defaultLoadBalancer; /** - * The {@link Expression} to use. + * The expression to use. */ private String expression; /** - * The {@link Expression} language to use, default is ref + * The expression language to use, default is ref. */ private String expressionLanguage = "ref"; @@ -196,6 +200,9 @@ public class CamelCloudConfigurationProperties { // ***************************************** public static class LoadBalancer { + /** + * Global option to enable/disable Camel cloud load balancer, default is true. + */ private boolean enabled = true; public boolean isEnabled() { @@ -212,7 +219,13 @@ public class CamelCloudConfigurationProperties { // ***************************************** public static class ServiceDiscoveryConfiguration { + /** + * Configure service discoveries. + */ private Map<String, List<String>> services = new HashMap<>(); + /** + * Configure cache timeout (in millis). + */ private String cacheTimeout; public Map<String, List<String>> getServices() { @@ -229,7 +242,13 @@ public class CamelCloudConfigurationProperties { } public static class ServiceDiscovery extends ServiceDiscoveryConfiguration { + /** + * Global option to enable/disable Camel cloud service discovery, default is true. + */ private boolean enabled = true; + /** + * Configure the service discovery rules. + */ private Map<String, ServiceDiscoveryConfiguration> configurations = new HashMap<>(); public boolean isEnabled() { @@ -250,6 +269,9 @@ public class CamelCloudConfigurationProperties { // ***************************************** public static class ServiceFilterConfiguration { + /** + * Configure service filter blacklists. + */ private Map<String, List<String>> blacklist = new HashMap<>(); public Map<String, List<String>> getBlacklist() { @@ -258,7 +280,13 @@ public class CamelCloudConfigurationProperties { } public static class ServiceFilter extends ServiceFilterConfiguration { + /** + * Global option to enable/disable Camel cloud service filter, default is true. + */ private boolean enabled = true; + /** + * Configure the service filtering rules. + */ private Map<String, ServiceFilterConfiguration> configurations = new HashMap<>(); public boolean isEnabled() { @@ -279,6 +307,9 @@ public class CamelCloudConfigurationProperties { // ***************************************** public static class ServiceChooser { + /** + * Global option to enable/disable Camel cloud service chooser, default is true. + */ private boolean enabled = true; public boolean isEnabled() { @@ -299,7 +330,6 @@ public class CamelCloudConfigurationProperties { * Configure if service registry should be enabled or not, default true. */ private boolean enabled = true; - /** * Configure the service listening address. */ @@ -313,7 +343,6 @@ public class CamelCloudConfigurationProperties { this.enabled = enabled; } - public String getServiceHost() { return serviceHost; }
