how to put comments on swagger documentation in spring boot

  1. Add the springfox-swagger2 and springfox-swagger-ui dependencies to your Maven or Gradle build file.

  2. Create a configuration class to customize the Swagger UI and API documentation.

  3. Use the @Api and @ApiOperation annotations to add comments to your controller methods.

  4. Customize the Swagger UI using Docket and ApiInfo objects.

  5. Finally, run your Spring Boot application and access the Swagger documentation at the specified URL.

I hope this helps!