[ 
https://issues.apache.org/jira/browse/CAMEL-10031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15393712#comment-15393712
 ] 

Claus Ibsen edited comment on CAMEL-10031 at 7/26/16 12:24 PM:
---------------------------------------------------------------

Another though James and I had was to have an APT plugin code generate the 
spring boot schema and source code on-the-fly based on users configuring their 
application.yml / .properties file.

This is a bit of a hack in the sense then the IDE would need to sync when the 
end user adds a new endpoint id in that file.

So if the end user types
{code}
  camel.endpoint.ftp.foo.<cursor is here>
{code}

Then we generate the spring files based on using "foo" as a known prefix. Then 
the existing Spring Boot tooling and Spring Boot itself would be able to use 
that.

And the user can use the tooling to have code-assistance to setup the options 
which has documentation and default values out of the box.
{code}
  camel.endpoint.ftp.foo.host-name=myserver
  camel.endpoint.ftp.foo.directory-name=inbox
  camel.endpoint.ftp.foo.username=me
  camel.endpoint.ftp.foo.password=secret
{code}

The generated source code can be in the target directory so its not part of the 
source code the user sees or has in his/her code project.


was (Author: davsclaus):
Another though James and I had was to have an APT plugin code generate the 
spring boot schema and source code on-the-fly based on users configuring their 
application.yml / .properties file.

This is a bit of a hack in the sense then the IDE would need to sync when the 
end user adds a new endpoint id in that file.

So if the end user types
{code}
  endpoint.ftp.foo.<cursor is here>
{code}

Then we generate the spring files based on using "foo" as a known prefix. Then 
the existing Spring Boot tooling and Spring Boot itself would be able to use 
that.

And the user can use the tooling to have code-assistance to setup the options 
which has documentation and default values out of the box.
{code}
  endpoint.ftp.foo.host-name=myserver
  endpoint.ftp.foo.directory-name=inbox
  endpoint.ftp.foo.username=me
  endpoint.ftp.foo.password=secret
{code}

The generated source code can be in the target directory so its not part of the 
source code the user sees or has in his/her code project.

> camel-spring-boot - Add endpoint options as type-safe configuration properties
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-10031
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10031
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-spring-boot
>            Reporter: Claus Ibsen
>
> See CAMEL-9419.
> We can now configure this for all the components. But for endpoints its a bit 
> more as you can have many endpoints with different configuration.
> So either you assign an id to the endpoint you configure, and then need to 
> refer to the endpoint by id, in the camel routes. Or we figure out something 
> else. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to