Finatra v20.2.1 Release Notes
-
➕ Added
* ✅ finatra-kafka-streams: Add method to `c.t.f.kafkastreams.test.TopologyTesterTopic` to write Kafka messages with custom headers to topics. ``PHAB_ID=D424440`` * finatra-http: Add `toBufReader` to get the underlying Reader of Buf from StreamingResponse. If the consumed Stream primitive is not Buf, the returned reader streams a serialized JSON array. ``PHAB_ID=D434448`` * 👍 inject-app: Add functions to `c.t.inject.app.AbstractApp` to provide better ergonomics for Java users to call and use basic `App` lifecycle callbacks. ``PHAB_ID=D433874`` * inject-server: Add functions to `c.t.inject.server.AbstractTwitterServer` to provide better ergonomics for Java users to call and use basic `TwitterServer` lifecycle callbacks. ``PHAB_ID=D433874`` * inject-slf4j: Add a way to retrieve the currently stored Local Context map backing the MDC. ``PHAB_ID=D431148`` * 👍 finatra-jackson: Added new functionality in the `CaseClassDeserializer` to support more Jackson annotations during deserialization. See documentation for more information. ``PHAB_ID=D407284`` * ✅ finatra: Add NullKafkaProducer for unit tests to avoid network connection failures in the log. ``PHAB_ID=D429004`` 🔄 Changed
⚡️ finatra: Update Google Guice version to 4.2.0
PHAB_ID=D372886
finatra: Bumped version of Joda to 2.10.2 and Joda-Convert to 1.5.
PHAB_ID=D435987
🚚 finatra-jackson|finatra-http-annotations: Move http-releated Jackson "injectablevalues" annotations from
finatra/jackson
tofinatra/http-annotations
.
Specifically the follow have changed packages,
c.t.finatra.request.QueryParam
-->c.t.finatra.http.annotations.QueryParam
c.t.finatra.request.RouteParam
-->c.t.finatra.http.annotations.RouteParam
c.t.finatra.request.FormParam
-->c.t.finatra.http.annotations.FormParam
c.t.finatra.request.Header
-->c.t.finatra.http.annotations.Header
c.t.finatra.request.JsonIgnoreBody
-->c.t.finatra.http.annotations.JsonIgnoreBody
Users should update from
finatra/jackson/src/main/java
(finatra-jackson_2.12
) tofinatra/http-annotations/src/main/java
(finatra-http-annotations_2.12
).PHAB_ID=D418766
⚡️ finatra-jackson: Updated Finatra Jackson integration to introduce a new
ScalaObjectMapper
and module to simplify configuration and creation of the mapper. See documentation for more information.PHAB_ID=D407284
🚚 finatra-jackson: (BREAKING API CHANGE) Moved the java binding annotations,
CamelCaseMapper
andSnakeCaseMapper
fromc.t.finatra.annotations
infinatra/jackson
toc.t.finatra.json.annotations
infinatra/json-annotations
. Movedc.t.finatra.response.JsonCamelCase
toc.t.finatra.json.annotations.JsonCamelCase
which is also now deprecated. Users are encouraged to use the standard Jackson annotations or a mapper with the desired property naming strategy configured.
Many exceptions for case class deserialization were meant to be internal to the framework but are useful or necessary outside of the internals of JSON deserialization. As such we have cleaned up and made most JSON deserialization exceptions public. As a result, all the exceptions have been moved from
c.t.finatra.json.internal.caseclass.exceptions
toc.t.finatra.jackson.caseclass.exceptions
.c.t.finatra.json.internal.caseclass.exceptions.CaseClassValidationException
has been renamed toc.t.finatra.jackson.caseclass.exceptions.CaseClassFieldMappingException
.JsonInjectException
,JsonInjectionNotSupportedException
, andRequestFieldInjectionNotSupportedException
have all been deleted and replaced withc.t.finatra.jackson.caseclass.exceptions.InjectableValuesException
which represents the same error cases.The
FinatraJsonMappingException
has been removed. Users are encouraged to instead use the general JacksonJsonMappingException
(which theFinatraJsonMappingException
extends).RepeatedCommaSeparatedQueryParameterException
has been moved tom finatra/http.PHAB_ID=D407284
🛠 Fixed
* 👍 finatra-jackson: Access to parameter names via Java reflection is not supported in Scala 2.11. Added a work around for the parsing of case class structures to support JSON deserialization in Scala 2.11 and forward. ``PHAB_ID=D431837`` * finatra-jackson: Fix for enforcing "fail on unknown properties" during deserialization. Previously, the `CaseClassDeserializer` was optimized to only read the fields in the case class constructor from the incoming JSON and thus ignored any unknown fields during deserialization. The fix will now properly fail if the `DeserializationFeature` is set or if the `JsonProperties` is configured accordingly. ``PHAB_ID=D407284``