Why does springfox-swagger2 UI tell me “Unable to infer base url.”

前端 未结 13 923
醉话见心
醉话见心 2020-12-10 11:01

Why does springfox-swagger2 UI tell me Unable to infer base url. As far as I know, I am using a typical Swagger spring-boot configuration.

As you can

13条回答
  •  情书的邮戳
    2020-12-10 11:38

    in my case i had this line in my WebSecurityConfig.java:

    .antMatchers("swagger-ui.html").permitAll()
    

    and when i added this one:

    .antMatchers("/swagger-resources/**").permitAll()
    

    my problem resolved.

提交回复
热议问题