Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BF237200B87 for ; Mon, 19 Sep 2016 16:46:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BDDE5160ABB; Mon, 19 Sep 2016 14:46:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0F9CF160ACC for ; Mon, 19 Sep 2016 16:46:21 +0200 (CEST) Received: (qmail 55451 invoked by uid 500); 19 Sep 2016 14:46:21 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 55372 invoked by uid 99); 19 Sep 2016 14:46:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2016 14:46:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DB6B12C0D5A for ; Mon, 19 Sep 2016 14:46:20 +0000 (UTC) Date: Mon, 19 Sep 2016 14:46:20 +0000 (UTC) From: "Dhiraj Bokde (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10197) camel-spring-boot - Extend the configuration hints to nested properties MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Sep 2016 14:46:22 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15503679#comment-15503679 ] Dhiraj Bokde commented on CAMEL-10197: -------------------------------------- Nested properties would only work for first level properties, i.e. if a component has a property of type {{ClassA}}, and it's marked {{@NestedConfigurationProperty}}, Spring will only allow setting properties of that bean. This actually makes it easier to set properties of properties and create simple bean property fields on the fly. I've tried to think of a solution to it, but Camel refs won't work in the spring boot context, since properties can't be set as _ref_ string fields to point to the referenced bean. For e.g. if a component has property {{propA}} of type {{ClassA}}, Spring Boot won't allow setting it as propA=#refA, since it will try to convert it using it's own binding mechanism. I haven't tried it, but Spring Boot should support setting complex component with bean references using {{${}}}. > camel-spring-boot - Extend the configuration hints to nested properties > ----------------------------------------------------------------------- > > Key: CAMEL-10197 > URL: https://issues.apache.org/jira/browse/CAMEL-10197 > Project: Camel > Issue Type: Improvement > Components: camel-spring-boot > Reporter: Nicola Ferraro > Assignee: Dhiraj Bokde > > Support for spring-boot configuration allows users to configure the component properties but does not give any hint on nested properties. > There are many components that declare properties on nested beans. > Eg. camel-docker has only one property named _configuration_ . I found this pattern in components that allow users to specify a default value on the component and override it on each endpoint, if necessary. > Setting the property: > {code} > camel.component.docker.configuration.host=172.28.128.4 > {code} > allows a user to specify the docker host, but the tooling does not give suggestions about that property. > A way to allow the users to view the nested properties is using the {{NestedConfigurationProperty}} annotation on the spring-boot configuration class. The spring-boot inspector will scan the nested class for properties. > The drawback is that the javadoc is not read from setters. Another drawback is that we will be using a different approach respect to the "read-the-json" one. > We need to figure out how to add these properties. -- This message was sent by Atlassian JIRA (v6.3.4#6332)