3

This

application.properties file spring.mvc.pathmatch.matching-strategy = ant-path-matcher

does not work with

  <!-- https://mvnrepository.com/artifact/io.springfox/springfox-boot-starter -->
<!-- <dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency> -->

in pom.xml file

but does work with this :

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
    <version>2.7.4</version>
</dependency>

in pom.xml file.

How one can set the application.properties file property spring.mvc.pathmatch.matching-strategy = ? such that both dependencies are used in the same application without having the error :

> java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null

at maven clean install command .

Caesarius
  • 115
  • 5
  • Does this answer your question? [Spring Boot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'](https://stackoverflow.com/questions/70036953/spring-boot-2-6-0-spring-fox-3-failed-to-start-bean-documentationpluginsboo) – Panagiotis Bougioukos Oct 05 '22 at 21:57

1 Answers1

1

This is an open issue for sprinfox project, which is also documented in the release notes of spring-boot 2.6 Release Notes.

What you currently can do is try the workaround1 or workaround2 offered in the above issue.

Panagiotis Bougioukos
  • 15,955
  • 2
  • 30
  • 47
  • 1
    Thank you ! I think I am a step closer in solving and understanding the problem. – Caesarius Oct 05 '22 at 21:35
  • As far as imports for the workaround2 , there are classes that VSCode suggests more than one option or suggests adding a class which may mean that some Maven dependency may be missing. I would appreciate if the answer would give more details as like for teaching a beginner. Where in the spring file tree should the should code or class of workaround2 be inserted ? – Caesarius Oct 05 '22 at 21:49
  • @Caesarius both workarounds that I have linked to the answer is discussed under the linked github. You will find multiple explanations and discussions if you read the thread closely – Panagiotis Bougioukos Oct 05 '22 at 21:54