org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URLxxxxxxxx nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'xxxxController' method
There is already 'xxxController' bean method
xxxxController#getByOrgId(Long) mapped.
解决方法:
看一下是不是有两个方法都映射到了同一个URL。
比如
@GetMapping
Response getByFarmId(@RequestParam Long farmId) {
...
}
@GetMapping
Response getByOrgId(@RequestParam Long orgId) {
...
}
改成这样就好:
@GetMapping("/farm")
Response getByFarmId(@RequestParam Long farmId) {
...
}
@GetMapping("/org")
Response getByOrgId(@RequestParam Long orgId) {
...
}