-
@Documented @Target(METHOD) @Retention(RUNTIME) @Repeatable(RestMappings.class) public @interface RestMapping
只能依附在Service实现类的public方法上,且方法如果throws只能是IOException
value默认为"/" + Service的类名去掉Service字样的小写字符串 (如HelloService,的默认路径为/hello)。
详情见: https://redkale.org
- 作者:
- zhangjx
- 另请参阅:
RestService
-
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 intactionid操作ID值,鉴权时用到, 对应@HttpMapping.actionidbooleanauth是否鉴权,默认需要鉴权, 对应@HttpMapping.authintcacheSeconds结果缓存的秒数, 为0表示不缓存, 对应@HttpMapping.cacheSecondsStringcomment备注描述, 对应@HttpMapping.commentStringexample返回结果的样例 for OpenAPI Specification 3.1.0booleanignore是否屏蔽该方法进行HttpMapping转换String[]methods允许方法(不区分大小写),如:GET/POST/PUT,为空表示允许所有方法, 对应@HttpMapping.methodsStringname请求的方法名, 不能含特殊字符booleanrpcOnly是否只接收RPC请求, 对应@HttpMapping.rpcOnly
-
-
-
-
name
String name
请求的方法名, 不能含特殊字符- 返回:
- String
- 默认值:
- ""
-
-
-
comment
String comment
备注描述, 对应@HttpMapping.comment- 返回:
- String
- 默认值:
- ""
-
-
-
example
String example
返回结果的样例 for OpenAPI Specification 3.1.0- 返回:
- String
- 默认值:
- ""
-
-
-
methods
String[] methods
允许方法(不区分大小写),如:GET/POST/PUT,为空表示允许所有方法, 对应@HttpMapping.methods- 返回:
- String[]
- 默认值:
- {}
-
-