org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'searchController' method
search.controller.SearchController#searchForFiltersWithTypeRequest(SearchFiltersWithType)
to {[GET, POST] [/search/filters/type]}: There is already 'searchController' bean method
search.controller.SearchController#searchForFiltersWithTypeRequest(SearchFiltersWithTypeRequest) mapped.
У меня есть контроллер, в котором есть: [code] @RequestMapping(value = SEARCH_BY_FILTERS_WITH_TYPE, method= {RequestMethod.GET, RequestMethod.POST}, headers = JSON) @Secured(Permissions.VIEW) @ResponseBody public AjaxJsonResponseBuilder searchForFiltersWithTypeJson(@RequestBody SearchFiltersWithTypeRequest request) { return search(request); }
@RequestMapping(value = SEARCH_BY_FILTERS_WITH_TYPE, method= {RequestMethod.GET, RequestMethod.POST}) @Secured(Permissions.VIEW) @ResponseBody public AjaxJsonResponseBuilder searchForFiltersWithType(SearchFiltersWithTypeRequest request) { return search(request); } [/code] и у меня возникает ошибка при запуске приложения: [code]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'searchController' method search.controller.SearchController#searchForFiltersWithTypeRequest(SearchFiltersWithType) to {[GET, POST] [/search/filters/type]}: There is already 'searchController' bean method search.controller.SearchController#searchForFiltersWithTypeRequest(SearchFiltersWithTypeRequest) mapped. [/code] Весенняя версия: 5.3.34