简体   繁体   English

Swagger 错误 Springboot Could not resolve view with name 'forward:/swagger-ui/index.html'

[英]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.

相关问题 如何在 swagger-UI 中的 index.html 中设置 url - How to set url in index.html in swagger-UI 如何在“swagger-ui/index.html”中显示手动生成的 OAS - How to display a manually generated OAS in "swagger-ui/index.html" Spring springdoc-openapi:swagger-ui/index.html 找不到状态=404 - Spring springdoc-openapi : swagger-ui/index.html cannot be found status=404 无法在名称为“ dispatcherServlet”的servlet中解析名称为“ forward:/index.html”的视图 - Could not resolve view with name 'forward:/index.html' in servlet with name 'dispatcherServlet' 获取,java.lang.IllegalArgumentException:访问swagger-ui时,路径index.html不能以“ /”字符开头 - Get, java.lang.IllegalArgumentException: Path index.html does not start with a “/” character, when accessing swagger-ui 如何在webapp中查看我的index.html文件,该文件是从url上的swagger ui克隆的 - how to view my index.html file inside webapp which is cloned from swagger ui on a url swagger-ui 和 spring webflux 的 404 错误 - 404 error with swagger-ui and spring webflux .antMatchers("/swagger-ui/**").permitAll() 错误 405 - .antMatchers("/swagger-ui/**").permitAll() error 405 Swagger UI在index.html页面上不显示任何内容 - Swagger UI Not Displaying Any Content On index.html Page 使用Jersey配置Swagger-ui - Config Swagger-ui with Jersey
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM