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