簡體   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:實現“io.springfox:springfox-boot-starter:3.0.0”實現“io.springfox:springfox-swagger-ui:3.0.0”

運行時錯誤:無法解析名稱為“forward:/swagger-ui/index.html”的視圖

解決方案:像這樣創建一個bean:

  @Bean
  public InternalResourceViewResolver defaultViewResolver() {
    return new InternalResourceViewResolver();
  }

來源: https://github.com/springdoc/springdoc-openapi/issues/236

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM