很抱歉,如果这是一个愚蠢的问题:使用之前Spring MVC没有问题(没有*)。我想为什么需要*。代码工作正常,但如果getPlanilha
具有相同的RequestMethod
而Consumes
将执行create
方法?由*引起,因为两者将具有相同的值(/planilha/anything
)
@RequestMapping(value = "/planilha/*", method = RequestMethod.POST, consumes = "application/json")
public String create(HttpServletRequest request, @RequestBody String jsonStr) {
}
@RequestMapping(value = "/planilha/{id}", method = RequestMethod.GET)
public String getPlanilha(@PathVariable("id") String id) {
}