[Solved] Springboot Error: swagger-UI/index.html Access Error 404

Springboot solves swagger UI/index HTML Access Error 404

Recently, I was working on a project to adopt swagger 3.0. After the project is started, access the swagger path: http://localhost:8880/vdmpess -web/swagger-ui/index. HTML reports 404 because webmvcconfig inherits webmvcconfigurationsupport. After inheriting this class, the relevant contents configured in the configuration file will become invalid and the static resource needs to be re specified
the swagger static resource needs to be re specified.

Swagger address in project


Adds the address of the specified static resource

public class WebMvcConfig extends WebMvcConfigurationSupport {

    public void addResourceHandlers(ResourceHandlerRegistry registry) {

Read More: