A Restful CRUD API for a simple Book Management Application using Spring Boot, MongoDB, JPA, Junit and MockMVC
- Java 1.8.x
- MongoDB
- Maven 3.x.x
1. Clone the application
git clone https://github.com/ahmedolaibrahim/ztp-springboot.git
2. Create MongoDB database
use ztp_bootspring
3. Change mongoDb access credentials to suit your mongo deployment
-
open
src/main/resources/application.properties
-
change
spring.data.mongodb.host
,spring.data.mongodb.port
,spring.data.mongodb.username
,spring.data.mongodb.password
and ``spring.data.mongodb.database` as per your mongodb deployment
4. Build and run the app using maven
mvn package
java -jar target/ztp-books-1.0.0.jar
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8080.
mvn test
if tests runs successfully you should have
The app defines following routes.