An example to show a Spring MVC implementation of a couple of REST services with Swagger documentation and Swagger UI.
- Spring
- Spring Boot
- Spring Boot Devtools (hot reloading)
- JPA
- Spring Data JPA
- H2
- Swagger
- Springfox Swagger UI (http://localhost:8080/swagger-ui.html)
- Apache Utilities
- Jackson JAXB JSON Object Mapper
- Cucumber (Behavior Driven Development)
- Unitils (Reflection Assert)
Prerequisites: The project should not be in a zip file.
- Download and start Spring Tool Suite from https://spring.io/tools/sts/all
- Click File -> Import... -> Existing Maven Projects
- Run the class sf.example.Boot
To test out the service, visit the Swagger UI at: http://localhost:8080/swagger-ui.html
In the real world, there would be a lot of duplicate code to remove, but I have left the duplication for demonstration purposes.