Add these dependencies to your pom.xml file
Now you can create the Swagger configuration file
Now you are ready. Your REST controllers are now available on Swagger 2. You can access the Swagger documentation via http://localhost:8090/swagger-ui.html You may change the port with the port your application is running.
You can find the complete code from my GitHub