简体   繁体   中英

How to integrate swagger to my existing java project ?

I have an existing project having java code for Rest Web Services. I integrated Swagger to the java project which in turn added lot of annotations and descriptions, messing up my existing code. Is there a way to integrate swagger and read values from another class instead of messing up my existing class?

You just need to add the following annotation with you java file:

@Api(value = "myAdmin", description = "Operation pertaining Admin UI")

Other things are taken care by the RestContoller and all byt itself. This annotation is not at all messing up with your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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