Skip to main content
edited tags
Link
Rick Pannekoek
  • 21.4k
  • 1
  • 18
  • 30
Source Link

DXA 2.2 - JAVA Unable to use Jackson default naming strategy, it always applies UpperCamelCase naming strategy on request and response

I am using dxa-2.2 java, there is rest controller which takes some request and return response.

After investigation i found DxaSpringInitialization.class on dxa framework initializing objectMapper with UpperCamelCase Strategy,

objectMapper.setPropertyNamingStrategy(new UpperCamelCaseStrategy());

And since DxaSpringInitialization is being imported on App (@SpringBootApplication) like @Import({DxaSpringInitialization.class}),

Naming strategy is being applied to controller request and response.

could someone please suggest how could i use default naming strategy on specific controller