Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'appController' bean method

前端 未结 7 1348
感情败类
感情败类 2021-02-05 10:04

Good morning all, i\'m dealing with an Ambiguous mapping i cannot decode... I\'m using Spring mvc 4.0.6 and hibernate 4.3.6 I\'m getting this error while launching the war in to

7条回答
  •  感动是毒
    2021-02-05 10:37

    It is unrelated to the issue reported here, butsince this is the top most search in google on this issue. I wanted to also mention another reason this issue occurs is when you mark your controller method as private (It happens to me because I use IDE auto-complete for methods).

    @RequestMapping(value="/products",  method=RequestMethod.POST)
    private List getProducts() {
        return productService.getProducts();
    }
    

    Making it public should resolve the issue.

提交回复
热议问题