Valeriy Ak created CAMEL-19851:
----------------------------------

             Summary: Spring-boot auto-configuration do not worls for type 
Timeout
                 Key: CAMEL-19851
                 URL: https://issues.apache.org/jira/browse/CAMEL-19851
             Project: Camel
          Issue Type: Bug
          Components: camel-http
    Affects Versions: 4.x
         Environment:  
 
            Reporter: Valeriy Ak


In http component we have some properties with type 
org.apache.hc.core5.util.Timeout:
 * camel.component.http.connect-timeout
 * camel.component.http.connection-request-timeout
 * camel.component.http.response-timeout
 * camel.component.http.so-timeout{*}{*}

We can set this properies by spring boot prop file 
([documentation|https://camel.apache.org/components/4.0.x/http-component.html#_spring_boot_auto_configuration]).
 
 
However in current realization it is not posible to set thouse values because 
converter don't create Timeout object, it try to get bean with this name from 
spring context 
[HttpComponentConverter|https://github.com/apache/camel-spring-boot/blob/camel-spring-boot-4.0.x/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConverter.java#L77]
 , if bean not present it alwayes return null value.
 
It is not correct behavior - and correct way is convert value to [Duration 
|https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.typesafe-configuration-properties.conversion.durations]and
 the call Timeout.of(duration)
 
Please fix converter for org.apache.hc.core5.util.Timeout class
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to