Currently when reading/writing JSON and using the reader/marshaller provided and you want a custom Gson or ObjectMapper instance it still creates the not needed instance. Move the construction to a constructor and provide a constructor to directly pass in the pre-configured Gson or ObjectMapper instance. The same approach is used in Spring itself where Gson or ObjectMapper instances can be passed in.