Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Spring boot enable openapi swagger accessed

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

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Spring #boot #enable #openapi #swagger #accessed
ADD COMMENT
Topic
Name
9+6 =