Home > Software engineering >  Unable to Load Springfox 3.0 after migrating to embedded tomcat version 9.X in Spring Boot Applicati
Unable to Load Springfox 3.0 after migrating to embedded tomcat version 9.X in Spring Boot Applicati

Time:12-27

I am facing an issue while using springfox 3.0 version with updated version of tomcat 9.0.56.

Already added the url patterns in WebSecurityConfigurerAdapter to bypass the spring security.

While the springfox version is working fine with older version of tomcat, the new version is actually changing the url for the springfox .css and .js file causing the 401 unauthorised error. While hitting the correct url via postman or chrome(GET) url is working fine.

Any suggestion on how to resolve it?

Please note, its an enterprise application and i cannot share much details. So a generic query to get any ideas to resolve the same

CodePudding user response:

I know this does not solve your problem directly, but consider moving to springdoc. Springfox is so buggy at this point that is a pain to use. I've moved to springdoc 2 years ago because of its Spring WebFlux support and I am very happy about it. Additionally, it also supports Kotlin Coroutines, which I am not sure Springfox does.

If you decide to migrate, springdoc even has a migration guide.

CodePudding user response:

are these part of your WebSecurityConfigurerAdapter configuration?

public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/swagger-ui/**", "/swagger-resources/**", "/v2/api-docs", "/v3/api-docs");
}
  • Related