Jackson Configuration (not honored)

54 views
Skip to first unread message

Ben Podoll

unread,
Jun 20, 2020, 3:16:11 PM6/20/20
to kmongo
KMongo seems to work great if I use the Jackson annotations to modify how I would like my object serialized before being saved as a mongo document, but if I use jackson application configuration, such as "jackson.property-naming-strategy: SNAKE_CASE", instead of adding a Jackson annotation to each member variable on all my objects, KMongo seems to disregard that and not use that. If I construct an ObjectMapper it honors that. So, it seems that KMongo uses a different ObjectMapper bean, and I'd like to be able to get access that in order to update the property naming strategy at runtime.

zigzago

unread,
Jun 20, 2020, 4:05:03 PM6/20/20
to kmongo
You can find the mappers KMongo uses under the hood in KMongoConfiguration https://litote.org/kmongo/dokka/kmongo/org.litote.kmongo.util/-k-mongo-configuration/index.html

HTH
Reply all
Reply to author
Forward
0 new messages