繁体   English   中英

有什么方法可以在Eclipse中隐藏/折叠招摇注解?

[英]Any way to hide/fold swagger annotations in Eclipse?

我的控制器有一些带有大量描述的摇摇欲坠的注释。 这会使文件混乱并且难以跟踪代码。

文件中使用的示例代码块Swagger批注

有什么方法可以在日食中隐藏或折叠招摇或其他注释。

您可以将字符串外部化为常量或属性或yaml以获取干净的代码

@ApiParam(value = "${swagger.sample.request.ApiParam.value}") 
@RequestBody(required = true) 
List request,

@ApiParam(value = DocumentationConstants.SAMPLE, required = true) 
@RequestHeader(value = "sample", required = true) 
String example,

参考: 外部化

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM