I try to implement swagger2 in my project on spring boot. I add this dependencies in my pom.xml
io.springfox
springfox-swagger2
3.0.0
io.springfox
springfox-swagger-ui
3.0.0
Also, I have spring-security (basic auth)
http.csrf().disable()
.authorizeRequests()
.antMatchers("/v2/api-docs",
"/configuration/ui",
"/swagger-resources/**",
"/configuration/security",
"swagger-ui.html",
"/webjars/**",
"/configuration/**",
"/swagger*/**").permitAll()
.anyRequest().authenticated()
.and().httpBasic()
.and().sessionManagement().disable();
When I try http://localhost:8080/swagger-ui.html i get whitelabel error page - type=Not Found, status=404. But http://localhost:8080/v2/api-docs works fine and I see all info about API endpoints. How to fix it?