Finatra 19.7.0
Added
-
finatra-kafka-streams: Adding test/sample for
FinatraDslWindowedAggregations.aggregate. ae433fc -
finatra-jackson: Add
com.twitter.util.Timedeserializer withJsonFormatsupport. ed3d666
Changed
-
finatra-kafka: BUILD file update compile and runtime deps. 8241cd7
-
finatra-httpclient: introduce new
HttpClientModuleTraitand deprecateHttpClientModule.
TheHttpClientModulehas been modified to extend fromHttpClientModuleTraitto allow
for bridging the two implementations.c.t.f.httpclient.RichHttpClienthas also been deprecated
as part of this change. The newHttpClientModuleTraitallows for direct configuration of the
underlingc.t.finagle.Http.Client. The newHttpClientModuleTraitdoes not provide any
default bindings, so it is up to users to supply them - this allows for custom binding
annotations and binding multipleHttpClients, which was not previously possible with
HttpClientModule. fe0c94aTo migrate,
class MyHttpClientModule extends HttpClientModule { override val dest = "flag!mydest" override val sslHostname = Some("sslHost") }becomes
class MyHttpClientModule extends HttpClientModuleTrait { override val dest = "flag!mydest" override val label = "myhttpclient" val sslHostname = "sslHost" // we only override in this example for TLS configuration with the `sslHostname` override def configureClient( injector: Injector, client: Http.Client ): Http.Client = client.withTls(sslHostname) @Singleton @Provides final def provideHttpClient( injector: Injector, statsReceiver: StatsReceiver, mapper: FinatraObjectMapper ): HttpClient = newHttpClient(injector, statsReceiver, mapper) // Note that `provideHttpClient` no longer needs an injected `Service[Request, Response]` so // the following is only needed if you require a `Service[Request, Response]` elsewhere: @Singleton @Provides final def provideHttpService( injector: Injector, statsReceiver: StatsReceiver ): Service[Request, Response] = newService(injector, statsReceiver) }