Pihentagy
10/22/2024, 6:39 AM@Bean
@Primary
fun objectMapper(): ObjectMapper = ...
but this objectMapper is not used when persisting an Entity. The entity has a json field, where my custom serializer would be needed. But based on the error message it seems, that hibernate is not using that serializer. How to tell hibernate to use my custom objectMapper for json fields?Eric
10/22/2024, 8:21 PMPihentagy
10/23/2024, 10:36 AM@Bean
fun jsonFormatMapper(objectMapper: ObjectMapper): HibernatePropertiesCustomizer =
HibernatePropertiesCustomizer {
it[AvailableSettings.JSON_FORMAT_MAPPER] = JacksonJsonFormatMapper(objectMapper)
}
Pihentagy
10/23/2024, 10:37 AM