java 请求映射的默认请求方法类型是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38811606/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the default request method type for the request mapping?
提问by rozerro
What is the default request method type for the @RequestMapping
?
的默认请求方法类型是@RequestMapping
什么?
@RequestMapping(value = "addGoal")
public String addGoal(Model model) {...}
回答by codersingh
If you do not specify any mapping this method will resolve all the http request i.e. you can send GET, POST, HEAD, OPTIONS, PUT, PATCH, DELETE, TRACE request to the specified url and it will be resolved.
如果您不指定任何映射,此方法将解析所有 http 请求,即您可以将 GET、POST、HEAD、OPTIONS、PUT、PATCH、DELETE、TRACE 请求发送到指定的 url,它将被解析。