This project is a Spring Boot application which allows to select the products that are available based on the location of customer home.
This project can be imported directly as a Maven project.All the dependency needed for the project are handled in the POM.
Catalogue and Location are the model classes.
The application has two services. CustomerLocationSevice to fetch the customer location based on customer id. CatalogueSerice to render the products available based on the location.
This project is implemented with H2 database. It can be accessed through a browser based console.
The tests are written in Mockito. Given, When and Then are used for the tests definition.
Check out/clone the project.
mvn spring-boot:run command can be used to run from the command line.
Also it can be run using the command java -jar target/ItgWebPortal-0.0.1-SNAPSHOT.jar. The application can be launched through localhost:8098 and username/password is webadmin/webadmin.
H2 is an in-memory database and comes with easy maintenance.It is only added as a dependency in the project and can be accessed through a browser console. Spring Boot has a good integration with H2.
This application maintains customer id across pages. So the user is required to log out after placing orders. The application is implemented using the named parameters with Hibernate Query Language thereby preventing the chances of sql injections.