[英]Swagger error Springboot Could not resolve view with name 'forward:/swagger-ui/index.html'
Springboot 2.5.13, swagger2: implementation "io.springfox:springfox-boot-starter:3.0.0" implementation "io.springfox:springfox-swagger-ui:3.0.0" Springboot 2.5.13,swagger2:实现“io.springfox:springfox-boot-starter:3.0.0”实现“io.springfox:springfox-swagger-ui:3.0.0”
Runtime error: Could not resolve view with name 'forward:/swagger-ui/index.html'运行时错误:无法解析名称为“forward:/swagger-ui/index.html”的视图
The solution: create a bean like this:解决方案:像这样创建一个bean:
@Bean
public InternalResourceViewResolver defaultViewResolver() {
return new InternalResourceViewResolver();
}
source: https://github.com/springdoc/springdoc-openapi/issues/236来源: https://github.com/springdoc/springdoc-openapi/issues/236
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.