Why does swagger springboot configure WebMvcConfiguer?

configure swagger Why many blogs can access web pages directly by configuring swagger configuration, and why do I need to configure this to access
springboot version using the latest version 2.0.6 and 2.9.2

@Configuration
public class SpringMvcConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
}
Sep.02,2021

has been resolved because the project referenced when configuring application.yml is configured

mvc:
    static-path-pattern: /static/**

causes several resources that are scanned by default to be overwritten and replaced. Just delete the configuration of this mvc

  • How to encrypt springboot swagger parameters

    for example, the swagger in the project can generate the api list normally, but the parameters of the api in our project are not transmitted in clear text, which leads to the failure of the simulation request of swagger. I would like to ask you how to co...

    May.22,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1bb00-3b63a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1bb00-3b63a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?