OOAD project showcasing MVC architecture using Spring Boot and MongoDB
MavenSpring BootSpring WebSpring Data MongodbThymeleaf
All the source codes are under the src folder
- The "Model" of the architecture
- contains name, description, author, year of release and rating along with getter and setter functions.
- The "Controller" of the architecture
- Handles Get requests to /homepage, /viewbooks and /addbook, Post request on form submission and interactions with the mongodb database
- The "View" of the architecture
- Utilizes thymeleaf engine to handle the model data received from the controller
- Homepage provides links to the ViewBooks and AddBook urls
- ViewBooks show all the models stored in the database
- AddBook provides a form to submit a new entry into the database
- contains an interface extending Spring's MongoRepository
-
Since the project runs using maven, open a terminal at the project's location and enter the following command:
mvn spring-boot:run -
It is advisible to run the command below if any error is thrown:
mvn clean install -
localhost:8080/shows the Homepage -
localhost:8080/viewbooksshows the table containing all the data -
localhost:8080/addbookshows a form asking for the required details -
Navigation bar has been implemented for the user to go to different pages with ease