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

前端 未结 7 1299
感情败类
感情败类 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:36

    I encountered this and solved it by replacing name with value in PostMapping. Request Handler was

    @PostMapping(name = "/greetings/sayHi")
    public Object sayHi() {
    
      return "Hello";
    }
    

    Replacing key name

    @PostMapping(value = "/greetings/sayHi")
    public Object sayHi() {
        
      return "Hello";
    }
    

提交回复
热议问题