/taco-cloud

The Taco Cloud project from the famous book - "Spring in Action".

Primary LanguageJava

Table of Contents
  1. About The Project
  2. Getting Started
  3. Key Features
  4. Usage
  5. Contact

About The Project

The Taco Cloud project from the famous book - "Spring in Action".

Built With

  • Java
  • Spring
  • Apache Maven
  • Apache Tomcat
  • HTML5
  • CSS3
  • Thymeleaf
  • Microsoft SQL Server

(back to top)

Getting Started

Prerequisites

Before cloning and using this application, you'll need to install these things on your computer:

  • Java SE Development Kit 17: Of course you need to have Java installed to run a Java application. I used Java 17, but I think it works fine with the widely-used Java 8 (JDK 1.8), as well.
  • Spring Tool Suite 4: an Eclipse-based IDE to develop Spring applications. It provides a ready-to-use environment to implement, run, deploy, and debug the application. It validates your application and provides quick fixes for the applications.
  • Microsoft SQL Server 2019: a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications - which may run either on the same computer or on another computer across a network (including the Internet).

Installation

You can install this application by cloning this repository into your current working directory:

git clone https://github.com/theEmperorofDaiViet/taco-cloud.git

After cloning the repository, you can open the project by Spring Tool Suite.

Open the application.properties file in /src/main/resources to change the information about the datasource to fit your own settings.

Open SQL Server and create a database according to the script in SQLServer.sql file in /src/main/resources.

Finally, back to Spring Tool Suite and run the application.

(back to top)

Key Features

This project covers the features from chapter 1 to 5 of "Spring in Action":

  • Traditional multipage application (MPA) with Spring MVC
    • Design custom tacos by selecting ingredients
    • Place an order for the tacos you designed
    • Validate form input and display validation errors
    • See your order history
  • Spring Data: store information about ingredients, tacos, orders in Microsoft SQL Server database with:
    • JDBC (in previous version)
    • JPA
  • Spring Security:
    • Custom user storage:
      • In-memory user store (in previous version)
      • JDBC-based user store (in previous version)
      • LDAP-backed user store (in previous version)
      • Custom user details service
    • Log in/ Log out
    • Register new account
    • Secure against CSRF attacks

(back to top)

Usage

Here is an example to illustrate the features of this application

  • First, I log in to an existing account. I design two tacos and place an order for them. While entering information, I intend to provide data in the wrong format to illustrate data validation. Finally, I check order history to see my previous orders, including the order I've just placed.

  • Second, I log out and create a new account. I log in that new account and do the same things as above.

(back to top)

Contact

You can contact me via:


(back to top)