Spring Community,
I have an issue that appears to have been asked before, but not resolved. I have of course done my due diligence. However, I can't find the answer.
Why does the following never resolve when I perform a PUT on the URL?
Using the URL "http://localhost:8080/ABServer/sensor/add/testname/testtype/testlocation" spring mvc does not resolve the URL, but instead goes to the Index page.Code:@RequestMapping(value = "/sensor/add/{name}/{type}/{location}", method=RequestMethod.PUT,produces = "application/json") public @ResponseBody ResponseEntity<String> test(@PathVariable("name") String name, @PathVariable("type") String type, @PathVariable("location") String location, HttpServletRequest request, HttpServletResponse response) { HttpHeaders headers = new HttpHeaders(); headers.add("Content-Type", "application/json"); System.err.println("Made it: " + name + " " + type + " "); return new ResponseEntity<String>(headers, HttpStatus.ACCEPTED); }
In addition, if I remove the "location" variable, it works just fine (Much the same as the previously unanswered question). I've read the appropriate documentation and do not see a limit to the number of variables. In addition, the URL is certainly unique.
Thoughts? What am I missing?
Thanks


Reply With Quote