心情愉快是肉体和精神的最佳卫生法。——乔治·桑

原因:自己修改了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 registered HttpMessageConverter?

When overriding the default spring-boot registered HttpMessageConverter, you should have ByteArrayHttpMessageConverter registered as well to have proper springdoc-openapi support.

1
2
converters.add(new ByteArrayHttpMessageConverter());
converters.add(new MappingJackson2HttpMessageConverter(jacksonBuilder.build()));

Order is very important, when registering HttpMessageConverters.

https://github.com/springdoc/springdoc-openapi/issues/2143