Swagger error Springboot Could not resolve view with name 'forward:/swagger-ui/index.html'
Asked Answered
A

1

9

Springboot 2.5.13, swagger2: implementation "io.springfox:springfox-boot-starter:3.0.0" implementation "io.springfox:springfox-swagger-ui:3.0.0"

Runtime error: Could not resolve view with name 'forward:/swagger-ui/index.html'

Aliunde answered 19/5, 2022 at 9:0 Comment(0)
A
22

The solution: create a bean like this:

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

source: https://github.com/springdoc/springdoc-openapi/issues/236

Aliunde answered 19/5, 2022 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.