
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 0.73 KB | hits: 37 | expires: Never
Spring MVC:Request method 'GET' not supported,DefaultHandlerExceptionResolver handleHttpRequestMethodNotSupported
@Controller
public class TestResponse {
@RequestMapping(method=RequestMethod.GET, value="/test/emp/1",
headers="Accept=application/json")
public @ResponseBody Employee getEmp() {
Employee e = new Employee("ad", "asdad");
System.out.println("Hello World");
return e;
}
}
@Controller
@RequestMapping("/test")
public class TestResponse {
@RequestMapping(method=RequestMethod.GET, value="/emp/1",
headers="Accept=application/json")
public @ResponseBody Employee getEmp() {
Employee e = new Employee("ad", "asdad");
System.out.println("Hello World");
return e;
}
}