zoukankan      html  css  js  c++  java
  • spring接口文档注解:@ApiOperation

    @ApiOperation不是spring自带的注解是swagger里的 
    com.wordnik.swagger.annotations.ApiOperation;

    @ApiOperation和@ApiParam为添加的API相关注解,个参数说明如下: 
    @ApiOperation(value = “接口说明”, httpMethod = “接口请求方式”, response = “接口返回参数类型”, notes = “接口发布说明”;其他参数可参考源码; 
    @ApiParam(required = “是否必须参数”, name = “参数名称”, value = “参数具体描述”

    实际项目中非常需要写文档,提高Java服务端和Web前端以及移动端的对接效率。

    Swagger是当前最好用的Restful API文档生成的开源项目,通过swagger-spring项目

    实现了与SpingMVC框架的无缝集成功能,方便生成spring restful风格的接口文档,

    同时swagger-ui还可以测试spring restful风格的接口功能。

    详情请参考:http://blog.csdn.net/fansunion/article/details/51923720

  • 相关阅读:
    BugKu web 矛盾
    BugKu 域名解析
    Dummy game
    BugKu 变量1
    BugKu web5
    递归算法
    Django进阶(转载)
    centos 7防火情配置
    cenos7切换阿里源
    centos7 编译安装nginx
  • 原文地址:https://www.cnblogs.com/gXing/p/8630338.html
Copyright © 2011-2022 走看看