Skip to content

This application provides a management system for a restaurant specialized on cheeses

Notifications You must be signed in to change notification settings

enricmartos/cheese-mvc

Repository files navigation

Cheese MVC

Description

This application is a management system for a restaurant which allows you to see, edit and delete menu entries. You can add new menus as well, which are composed of several types of cheeses.

Personal goals

  • To get familiar with Spring Boot framework and learn how to perform basic CRUD operations
  • To acquire experience with ORM (Object-Relational Mapping) and JPA (Java Persistence API). Specifically, One-to-Many and Many-to-Many relationships
  • To start using Thymeleaf as a front-end template engine.
  • To implement custom model validations

Stack

Front-end

  • Thymeleaf
  • Bootstrap

Back-end

  • Spring Boot
  • Hibernate (as a JPA framework)

Database

  • MySQL

Server

  • Apache Tomcat (default embedded server provided by Spring Boot)

Dependency management tool

  • Gradle

Containerization

  • Docker-compose

Build setup

With Docker

# Start docker-compose

$ docker-compose up

This command creates the three docker containers detailed below:

  • cheese-mvc_app_1: Main container of the Spring Boot application

  • cheese-mvc_mysql_1: DB container

  • cheese-mvc_adminer_1: DB management tool to interact with the MySQL DB

Adminer's credentials are the ones defined in .env file.

  • Open your browser and test the application on localhost:8086/cheese

Without Docker

  • Clone this repo to your local machine. If you use IntelliJ as IDE, open this project there.

  • MySQL (and MySQL Workbench, optionally) must be already installed in your machine. Otherwise, you will have to install them. Please notice that the default parameters (port, username and password) to enable the MySQL connection are defined on application.properties file. So, feel free to edit them in order to match one of your MySQL connections.

# Create the db

CREATE SCHEMA `cheese-mvc` ;
  • Run the project as Spring Boot App

  • Open your browser and test the application on localhost:8086/cheese

References

I have accomplished the aforementioned goals thanks to the following course:

About

This application provides a management system for a restaurant specialized on cheeses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published