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'
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'
The solution: create a bean like this:
@Bean
public InternalResourceViewResolver defaultViewResolver() {
return new InternalResourceViewResolver();
}
source: https://github.com/springdoc/springdoc-openapi/issues/236
© 2022 - 2024 — McMap. All rights reserved.