package Ġcom . netflix . spin n aker . config Ċ Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġcom . netflix . spin n aker . config . okhttp 3 . Ok HttpClient Provider Ċ import Ġcom . netflix . spin n aker . ig or . Artifact Service Ċ import Ġcom . netflix . spin n aker . ig or . Sc m Service Ċ import Ġcom . netflix . spin n aker . ke el . services . Delivery Config Importer Ċ import Ġokhttp 3 . Http Url Ċ import Ġokhttp 3 . Http Url . Companion . to Http Url OrNull Ċ import Ġorg . springframework . beans . factory . Bean Creation Exception Ċ import Ġorg . springframework . beans . factory . annotation . Value Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . jackson . Jack son Converter Factory Ċ Ċ @ Configuration Ċ class ĠI gor Configuration Ġ{ ĊĠ Ġ@ Bean ĊĠ Ġfun Ġig or Endpoint (@ Value ("\ ${ ig or . base - url }") Ġig or BaseUrl : ĠString ): ĠHttp Url Ġ= ĊĠĠĠ Ġig or BaseUrl . to Http Url OrNull () ĊĠĠĠĠĠ Ġ?: Ġthrow ĠBean Creation Exception (" Invalid ĠURL : Ġ$ ig or BaseUrl ") ĊĊĠ Ġ@ Bean ĊĠ Ġfun Ġartifact Service ( ĊĠĠĠ Ġig or Endpoint : ĠHttp Url , ĊĠĠĠ ĠobjectMapper : ĠObjectMapper , ĊĠĠĠ Ġclient Provider : ĠOk HttpClient Provider ĊĠ Ġ): ĠArtifact Service Ġ= Ġbuild Service ( object Mapper , Ġig or Endpoint , Ġclient Provider ) ĊĊĠ Ġ@ Bean ĊĠ Ġfun Ġsc m Service ( ĊĠĠĠ Ġig or Endpoint : ĠHttp Url , ĊĠĠĠ ĠobjectMapper : ĠObjectMapper , ĊĠĠĠ Ġclient Provider : ĠOk HttpClient Provider ĊĠ Ġ): ĠS cm Service Ġ= Ġbuild Service ( object Mapper , Ġig or Endpoint , Ġclient Provider ) ĊĊĠ Ġ@ Bean ĊĠ Ġfun Ġdelivery Config Importer ( ĊĠĠĠ ĠobjectMapper : ĠObjectMapper , ĊĠĠĠ Ġsc m Service : ĠS cm Service ĊĠ Ġ) Ġ= ĠDelivery Config Importer ( object Mapper , Ġsc m Service ) ĊĊĠ Ġprivate Ġinline Ġfun Ġ< re ified ĠT > Ġbuild Service ( ĊĠĠĠ ĠobjectMapper : ĠObjectMapper , ĊĠĠĠ Ġig or Endpoint : ĠHttp Url , ĊĠĠĠ Ġclient Provider : ĠOk HttpClient Provider ĊĠ Ġ): ĠT Ġ= ĠRet rofit . Builder () ĊĠĠĠ Ġ. add Converter Factory ( Jack son Converter Factory . create ( object Mapper )) ĊĠĠĠ Ġ. baseUrl ( ig or Endpoint ) ĊĠĠĠ Ġ. client ( client Provider . getClient ( Default Service Endpoint (" ig or ", Ġig or Endpoint . toString ()))) ĊĠĠĠ Ġ. build () ĊĠĠĠ Ġ. create ( T :: class . java ) Ċ } Ċ