您的位置:首页 > 其它

restful 风格API 设计 403错误

2017-07-07 16:49 405 查看
在tomcat 的config 目录下面web.xml添加

<init-param>    

    <param-name>readonly</param-name>    

    <param-value>false</param-value>   

</init-param>  

可参考tomcat 配置属性
http://tomcat.apache.org/tomcat-7.0-doc/default-servlet.html
设计原则:简洁明了,去掉动作命名,get,post,put,delete 几乎对应 查 增 改 删, 

参数绑定 用好@RequestBody 和@PathVariable两个注解就好  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  api 设计 restful