You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/07/22 02:07:02 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1273: 在servicecomb中使用ModelAndView报错,如何使用ModelAndView????

yhs0092 commented on issue #1273: 在servicecomb中使用ModelAndView报错,如何使用ModelAndView????
URL: https://github.com/apache/servicecomb-java-chassis/issues/1273#issuecomment-513613614
 
 
   ServiceComb-Java-Chassis 是一个RESTful微服务框架,它被设计出来主要是收发数据,做业务数据交互的,也就是它本来的设计目的是作为一个后端服务框架使用,所以不建议拿它作为前端页面的处理框架。
   
   至于你碰到的这个错误,日志里已经把问题的直接原因打出来了
   ```
   Caused by: java.lang.Error: HttpMethod must not both be empty in class and method
   ```
   服务接口定义的时候没有指定HTTP method,比如像`@RequestMapping(path = "/sayhi", method = RequestMethod.POST)`这样的注解用法里,少了`method = RequestMethod.POST`这一段。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services