开发者社区 > 云原生 > 正文

Dubbo-Api-Docs有哪些注解说明?

Dubbo-Api-Docs有哪些注解说明?

展开
收起
1358896759097293 2021-03-17 17:18:13 1583 0
2 条回答
写回答
取消 提交回答
  • 45271990@qq.com

    注解说明  @EnableDubboApiDocs:配制注解,启用 dubbo api docs 功能。  @ApiModule:类注解,dubbo 接口模块信息,用于标注一个接口类模块的用途。  value:模块名称  apiInterface:提供者实现的接口  version:模块版本  @ApiDoc:方法注解,dubbo 接口信息,用于标注一个接口的用途。  value:接口名称  description:接口描述(可使用 html 标签)  version:接口版本  responseClassDescription:响应的数据的描述  @RequestParam:类属性/方法参数注解,标注请求参数。  value:参数名  required:是否必传参数  description:参数描述  example:参数示例  defaultValue:参数默认值  allowableValues:允许的值,设置该属性后界面上将对参数生成下拉列表  注:使用该属性后将生成下拉选择框  boolean 类型的参数不用设置该属性,将默认生成 true/false 的下拉列表  枚举类型的参数会自动生成下拉列表,如果不想开放全部的枚举值,可以单独设置 此属性  @ResponseProperty:类属性注解,标注响应参数。  value:参数名

    2021-03-18 23:06:33
    赞同 展开评论 打赏
  • Annotation use @EnableDubboApiDocs: 配制注解, 启用 dubbo api docs 功能 @ApiModule: class annotation, dubbo API module information, used to mark the purpose of an interface class module value: module name apiInterface: Provider implemented interface version: module version @ApiDoc: method annotation, dubbo API information, used to mark the purpose of an dubbo API value: API name description: API description(HTML tags available) version: API version responseClassDescription: response class description @RequestParam: class property/method Parameter annotation, mark request parameters value: parameter name required: true/false required parameter description: parameter description example: parameter example defaultValue: parameter default value allowableValues: Allowed values. After setting this property, a drop-down list will be generated for the parameter Note: a drop-down selection box will be generated after using this property Parameters of boolean type do not need to be set with this property. A drop-down list of true / false will be generated by default Parameters of enumeration type will automatically generate a drop-down list. If you do not want to open all enumeration values, you can set this property separately. @ResponseProperty: Class attribute annotation, mark response parameters value: parameter name example: example

    2021-03-18 00:31:57
    赞同 展开评论 打赏
问答标签:
问答地址:

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
CUDA MATH API 立即下载
API PLAYBOOK 立即下载
传统企业的“+互联网”-API服务在京东方的实践 立即下载