Reputation: 71
An 'java.lang.IllegalStateException: Ambiguous search mapping detected.' exception is thrown when I try to implement springfox-boot-starter 3.0.0 in Spring Boot 2.3.6.
I have two overloaded methods public abstract Collection abc(int)
and public abstract Page abc(int, Pagable)
in the same repository. The exception says that both these methods are mapped to /abc! Tweak configurations to get to unambiguous paths!.
Any suggestion to solve this issue? Thanks in advance!
Upvotes: 4
Views: 803
Reputation: 4802
In my opinion this is caused by the Springfox Spring Data Rest support, see https://springfox.github.io/springfox/docs/current/#springfox-spring-data-rest
So if you don't need the dependency io.springfox:springfox-data-rest
, then by not including it in pom.xml/build.grade, the issue should dissapear.
Or you could switch from Springfox to Springdoc. Then the issue can be mitigated by setting the Springdoc property springdoc.enable-data-rest: false
.
Upvotes: 0