the only global setting that worked for me is ObjectMapper
@Bean
@Primary
public ObjectMapper objectMapper()
{
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
final ObjectMapper mapper = new ObjectMapper();
mapper.setDateFormat(sdf);
mapper.enable(SerializationFeature.INDENT_OUTPUT);
return mapper;
}
CLICK HERE to find out more related problems solutions.