This project demonstrates the use of Spring Boot for creating a simple RESTful API and how we can integrate Swagger for documentation and API testing, as well as Rest Assured for integration/regression testing
- Maven
- Spring Boot stack
- Spring Data JPA (for persistence)
- Spring MVC (for REST endpoints)
- Swagger UI (for API testing)
- Rest Assured (for integration testing)
- Oracle JDK 1.8
- Maven
- IDE or editor of your choice
To start this web application just follow these steps:
-
Build the project via Maven:
$ mvn clean install
-
Start the application:
- In your IDE invoke the class method
Application#main
to start the server , or - From command line execute:
$ java -jar target/springboot-0.1-SNAPSHOT.jar
- In your IDE invoke the class method
-
Browse to the application root for API documentation:
-
Spring boot automatically provides an embedded Tomcat server and a persistence layer based on Hibernate (as JPA provider).
-
Data are automatically stored in an in-memory database. Changes are lost after restarting the application.
-
All REST endpoints can be tested locally with the Swagger UI frontend: