Closed larsf96 closed 2 years ago
@larsf96 I am wondering whether this could be a breaking change that registers all the modules that a project has having unexpected side effects.
Probably an API should be exposed to use registerModules
instead.
@poovamraj I added an API on Request level that can be executed to register modules for each call, would that be okay?
Changes
After initialization of CustomRequest, I added the call
this.mapper.findAndRegisterModules();
which will let the ObjectMapper register all the modules that are configured (i.e. JavaTimeModule for Java 8 Date classes) This fixes #440References
440
Testing
As this is only one line of code that has quite 0 logic, I didn't add tests. If required, a possible test could be to verify that the modules are getting loaded
Checklist