DEV Community

loading...

Enable Swagger2 with Spring Boot

Ravi Yasas
Software Engineer by profession. Author of https://javafoundation.xyz
Updated on ・1 min read

Swagger2

Swagger2 dependencies

Add these dependencies to your pom.xml file

Swagger configuration 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

Discussion (0)

Forem Open with the Forem app