Skip to content

Commit

Permalink
[UNI-255] fix: json 지원
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Feb 20, 2025
1 parent 71d5b16 commit e2aa5b1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ public void configureMessageConverters(List<HttpMessageConverter<?>> converters)
config.setWriterFeatures(JSONWriter.Feature.WriteMapNullValue, JSONWriter.Feature.PrettyFormat);
converter.setFastJsonConfig(config);
converter.setDefaultCharset(StandardCharsets.UTF_8);
converter.setSupportedMediaTypes(Collections.singletonList(MediaType.APPLICATION_JSON));
converter.setSupportedMediaTypes(Collections.singletonList(new MediaType("application", "openmetrics-text", StandardCharsets.UTF_8)));

converter.setSupportedMediaTypes(List.of(
MediaType.APPLICATION_JSON, // application/json 지원
new MediaType("application", "json", StandardCharsets.UTF_8),
new MediaType("application", "openmetrics-text", StandardCharsets.UTF_8)
));

converters.add(0, converter);
converters.forEach(c -> log.info("βœ” {}", c.getClass().getName()));
}
Expand Down

0 comments on commit e2aa5b1

Please sign in to comment.