Add constants for application/cbor to MediaType
Closes gh-23042
This commit is contained in:
@@ -450,7 +450,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
defaultMediaTypes.put("smile", "application/x-jackson-smile");
|
||||
}
|
||||
if (jackson2CborPresent) {
|
||||
defaultMediaTypes.put("cbor", "application/cbor");
|
||||
defaultMediaTypes.put("cbor", MediaType.APPLICATION_CBOR_VALUE);
|
||||
}
|
||||
return defaultMediaTypes;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
map.put("smile", MediaType.valueOf("application/x-jackson-smile"));
|
||||
}
|
||||
if (jackson2CborPresent) {
|
||||
map.put("cbor", MediaType.valueOf("application/cbor"));
|
||||
map.put("cbor", MediaType.APPLICATION_CBOR);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user