[
https://issues.apache.org/jira/browse/CAMEL-15135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Omar Al-Safi resolved CAMEL-15135.
----------------------------------
Resolution: Fixed
https://github.com/apache/camel-spring-boot/commit/60b3958c65884de16d3a39a558ff4ca129192865
> camel-spring-boot-generator-maven-plugin is not able to parse default
> duration value into long field type
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-15135
> URL: https://issues.apache.org/jira/browse/CAMEL-15135
> Project: Camel
> Issue Type: Bug
> Components: tooling
> Reporter: Omar Al-Safi
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 3.4.0
>
>
> If we have the following in the component configuration:
> {code:java}
> @UriParam(javaType = "java.time.Duration", defaultValue = "10s")
> private Long writeTimeoutMillis = 100L;
> {code}
> Here the field is long, but the javaType being overiden to
> {{java.time.Duration}} with default value {{10s}}. And then will be converted
> to {{Duration}} in the generated configurer.
> However in the spring boot maven plugin, when it generates the spring boot
> starter component configuration, the logic is not fully adopted, for
> example, it will take the default value of {{10s}} and it will assign it to
> the long type field, e.g:
> {code}
> private Long writeTimeoutMillis = 10sL;
> {code}
> Which as result it will produce compilation errors.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)