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/");
}
}