Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

spring boot swagger ui 401

// Fixed by lowering the swagger version to 2.7.0

@EnableWebSecurity
@Configuration
public class ResourceServerConfig extends WebSecurityConfigurerAdapter {
//...//
    public static final String[] AUTH_WHITELIST = {
        "/swagger-ui.html/**", "/configuration/**", "/swagger-resources/**", "/v2/api-docs", "/webjars/**"
    };
//...//

    @Override
    public void configure(WebSecurity web) throws Exception {
        web.ignoring().mvcMatchers(HttpMethod.OPTIONS, "/**");
        web.ignoring().antMatchers(AUTH_WHITELIST);
    }
  
}
Comment

PREVIOUS NEXT
Code Example
Java :: work with arrays java 
Java :: compareto in java string 
Java :: java create file 
Java :: phone number format java 
Java :: count the number of occurrences of a character in a string java 
Java :: how to initialize a string in java 
Java :: retrofit 
Java :: android studio setBackground 
Java :: how to sort arraylist 
Java :: java localdate subtract two dates 
Java :: java get class name of object 
Java :: java generics type 
Java :: set matrix zeros 
Java :: how to concatenate two strings in java 
Java :: java abstraction 
Java :: convert object array to int array java 
Java :: scala vs java 
Java :: android view set padding programmatically 
Java :: java date equals other date 
Java :: final vs static keyword in java 
Java :: Java How to use List? 
Java :: java static variable 
Java :: How to merge two sorted arrays in Java? 
Java :: java generic type method 
Java :: android arraylist to comma separated string 
Java :: spring mvc project example 
Java :: java unique queue 
Java :: fullscreen java 
Java :: check if LinkedList is empyth java 
Java :: java creare costante 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =