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风格的接口功能。

    详见:https://blog.csdn.net/fansunion/article/details/51923720

  • 相关阅读:
    [BZOJ1303][CQOI2009]中位数图
    [BZOJ1192][HNOI2006]鬼谷子的钱袋
    9.5题解
    9.3题解
    9.2题解
    9.1题解
    8.29题解
    8.28题解
    8.23<2>题解
    8.23<1>题解
  • 原文地址:https://www.cnblogs.com/felixzh/p/11805414.html
Copyright © 2011-2022 走看看