Skip to content

jacksn/onlinecafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codacy Badge Build Status codecov

Online cafe

This is a test task Java web application that uses multitier architecture.

Application Demo: https://onlinecafe.herokuapp.com/ (Takes some time to boot up).

All versions use:

  • Plain JDBC for database connectivity.
  • Logback for logging, JUnit, Hamcrest, Mockito for testing.
  • Boostrap, jQuery, Bootstrap Notify, Font Awesome for front-end.

Current version uses Spring Boot, Spring Web MVC, Thymeleaf, Spring Data JPA, Hibernate ORM, Hibernate Validator, Spring Boot Test.

Links to other versions:

Configuration

By default application will read database connection properties from resources/db/db.properties file. You can override default database connection properties by creating separate properties file under resources/db directory (e.g. db_mssql.properties) and setting system property db_config_path pointing to that file.

Available jdbc connectors: MySQL, PostgreSQL, MSSQL, HSQLDB.

Also you can change repositories implementations and discount strategy.

You can choose which repositories implementations to use by activating one from following Spring profiles:

You can choose which discount implementation to use on settings page:

By default application will use repo-datajpa Spring profile.

How to Run

This application is packaged as a war which has Tomcat 8 embedded. No Tomcat installation is necessary.

  • Clone this repository
  • Make sure you are using JDK 1.8 and Maven 3.x
  • You can build the project and run the tests by running mvn clean package
  • Once successfully built, you can run application with following command:
    mvn spring-boot:run -Drun.arguments="--spring.profiles.active=repo-datajpa,--db_config_path=db_mysql.properties"

Releases

No releases published

Packages

No packages published

Languages