How to run Swagger 3 on Spring Boot 3

I had given up and went to use Spring Boot 2.7 after posting the question. But, after seeing Dmitriy’s answer though, I checked Springdoc one last time and found that Springdoc v2 does support Spring Boot 3. Essentially, one has to place the following in their pom: <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> <version>2.0.0</version> </dependency> Then one can … Read more

Disabling a filter for only a few paths

In your custom AuthenticationFilter you can define a RequestMatcher and use it before doing your logic, like so: public class AuthenticationFilter extends OncePerRequestFilter { private final RequestMatcher ignoredPaths = new AntPathRequestMatcher(“/swagger-ui”); @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) { if (this.ignoredPaths.matches(request)) { filterChain.doFilter(request, response); return; } // do your logic filterChain.doFilter(request, response); } … Read more

How to configure Spring Security to allow Swagger URL to be accessed without authentication

Adding this to your WebSecurityConfiguration class should do the trick. @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/**”); } }

Added Springfox Swagger-UI and it’s not working, what am I missing?

Springfox 3.0.0 only works with Spring Boot <= 2.6.0-M2 but not with versions above it Options for Spring Boot 2.6 M2 < 1. spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER #-> App.properties     –    But without Actuator 2. @EnableWebMvc 3. Migrate to springdoc-openapi-ui – same steps as io.springfox >= 3.X io.springfox >= 2.X io.springfox >= 3.X <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version></dependency><dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> … Read more

Spring Boot 2.6.0 / Spring fox 3 – Failed to start bean ‘documentationPluginsBootstrapper’

This problem’s caused by a bug in Springfox. It’s making an assumption about how Spring MVC is set up that doesn’t always hold true. Specifically, it’s assuming that MVC’s path matching will use the Ant-based path matcher and not the PathPattern-based matcher. PathPattern-based matching has been an option for some time now and is the … Read more

Springboot 2.6.0 / Spring fox 3 – Failed to start bean ‘documentationPluginsBootstrapper’

This problem’s caused by a bug in Springfox. It’s making an assumption about how Spring MVC is set up that doesn’t always hold true. Specifically, it’s assuming that MVC’s path matching will use the Ant-based path matcher and not the PathPattern-based matcher. PathPattern-based matching has been an option for some time now and is the … Read more