1

All java.util.Date objects are converted like "2020-09-23T09:53:06.93Z[UTC]" but i don't want to include timezone in the serialized date like "2020-09-23T09:53:06.93". So i decided to use Jackson ContextResolver. I have used @Provider annotation and set objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss.SSS")). My ContextResolver is loaded but getContextMethod is not invoked.

Can you confirm whether i'm doing right approach? Also assist me to resole this.

Raj Kumar
  • 347
  • 3
  • 11
  • 1) Did you accidentally use the Codehaus ObjectMapper instead of the FasterXML one? 2) How are you registering your providers, by scanning? Are you sure it's registerd? 3) getContext() should only be called once per class type. 4) You can check to see if the ContextResolver is registered by injecting @Context [Provider](https://docs.oracle.com/javaee/7/api/javax/ws/rs/ext/Providers.html) and lookup the resolver – Paul Samsotha Sep 23 '20 at 18:38
  • 0 I am running into the same issue. Wondering if you happen remember the cause/solution? Much appreciated. Thank you. – akd Oct 14 '21 at 19:50

0 Answers0