弹簧启动无法解决PUT和POST问题

时间:2015-05-28 11:05:19

标签: rest spring-mvc spring-boot

我正在使用REST构建一个带有Spring的应用程序我的GET方法正在运行,但POST和PUT方法无法正常工作:

var parent: any = this.parent;
parent.displayObjProperty; // OK

我搜索了很多这个问题,但没有找到令人满意的解决方案。

我的控制器代码是:

2015-05-28 16:30:09.498 DEBUG 22670 --- [qtp536775614-18] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /api/v1/user
2015-05-28 16:30:09.500 DEBUG 22670 --- [qtp536775614-18] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
2015-05-28 16:30:09.500 DEBUG 22670 --- [qtp536775614-18] .w.s.m.a.ResponseStatusExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
2015-05-28 16:30:09.500 DEBUG 22670 --- [qtp536775614-18] .w.s.m.s.DefaultHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
2015-05-28 16:30:09.501  WARN 22670 --- [qtp536775614-18] o.s.web.servlet.PageNotFound             : Request method 'PUT' not supported
2015-05-28 16:30:09.501 DEBUG 22670 --- [qtp536775614-18] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2015-05-28 16:30:09.502 DEBUG 22670 --- [qtp536775614-18] o.s.web.servlet.DispatcherServlet        : Successfully completed request

0 个答案:

没有答案