📜  Spring boot 启用 openapi swagger 访问 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:57.006000             🧑  作者: Mango

代码示例1
@Configuration
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring().antMatchers("/v2/api-docs",
                                   "/configuration/ui",
                                   "/swagger-resources/**",
                                   "/configuration/security",
                                   "/swagger-ui.html",
                                   "/webjars/**");
    }

}