原因:自己修改了ByteArrayHttpMessageConverter
的顺序。。。
解决方案:
OpenAPI 3 Library for spring-boot
13.79. Why am i getting an error:
Swagger UI unable to render definition
, when overriding the default spring registeredHttpMessageConverter
?When overriding the default spring-boot registered
HttpMessageConverter
, you should haveByteArrayHttpMessageConverter
registered as well to have properspringdoc-openapi
support.
converters.add(new ByteArrayHttpMessageConverter()); converters.add(new MappingJackson2HttpMessageConverter(jacksonBuilder.build()));