Spring boot

Coffeshop Inventory System using Spring boot

The Coffeshop shop pos system is developed using Spring boot. The project is built to manage sales and transactions. To make a new transaction, fields such as:items type and Drink type, qty needs to be selected. If you like to learn point of sales systems step by step, this is the right place to learn from the beginning. In this tutorial useful for making a point of sales system for a small shops.

First Step Create the Spring boot you have to go the website start.spring.io  

above the image shown how to add the dependencies and create project.

after created the project you have to import in to the eclipse.

First step have to create the view page. go to the src/main/resources Folder
expand it you wil have a folder named templates  inside the folder you will have to create the index.html.
after created the page you have to paste the code inside the page.  you can download images folder and component folder  here  files

<html>
<head>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>


</head>
<body>

<nav class="navbar navbar-dark bg-dark">

    <span class="navbar-brand md-0 h1">Coffee Shop Pos</span>

</nav>
<div class="row">

    <div class="col-sm-3">
        <div class="container">
            <div class="list-group-item list-group-tem-action active">Item</div>

            <div class="panel-body bg-dark" style="color: white">
                <form id="tbl-project">
                    <table class="table table-bordered" style="color: white">

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Nuggets Fries">
                                <label>Nuggets Fries</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Village Fries">
                                <label>Village Fries</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Fries">
                                <label>Fries</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>


                    </table>


                </form>
            </div>




        </div>


    </div>

    <div class="col-sm-3">
        <div class="container">
            <div class="list-group-item list-group-tem-action active">Drinks</div>

            <div class="panel-body bg-dark" style="color: white">
                <form id="tbl-project">
                    <table class="table table-bordered" style="color: white">

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Tea">
                                <label>Tea</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Coffee">
                                <label>Coffee</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Apple Juice">
                                <label>Apple Juice</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td>
                                <input type="checkbox" name="pos" value="Orange Juice">
                                <label>Orange Juice</label>
                            </td>

                            <td> <input type="number" name="qty" id="qty"></td>
                        </tr>

                        <tr>
                            <td colspan="3" align="right">

                                <input type="button" class="btn btn-info"  value="Add" >

After done the view part let moving to Controller part.

Controller

lets select the project folder and right click new->package->com.example.IceCreamInventory. IceController and type package name like this. after created the package inside the package have create controller CoffeeeController.java

Inside the page you have add it

@Controller
public class CoffeeeController {
 
 @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String index() {
       return "index";
    }

}

above code shown when you run the page it will be calling the  index action method.

After go to the src/main/resources Folder  expand it  you will have file application.properties
paste the below code

spring.jpa.hibernate.ddl-auto=none
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

server.port=9020

above code shown only set the port of Spring boot Application.

After go to main page of  Spring boot Application above @SpringBootApplication Annotation paste the @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@SpringBootApplication
public class CoffeeShopApplication {

 public static void main(String[] args) {
  SpringApplication.run(CoffeeShopApplication.class, args);
 }

}

i have attached the video link below. which will do this tutorials step by step.

 

admin

Recent Posts

Employee Working Hours Calculation System using C#.net

Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…

2 weeks ago

Java Payroll System Calculate Employee Overtime

Act as a Java developer to create a program that calculates the gross wage for…

2 weeks ago

Employee Working Hours Calculation System using Java

Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…

2 weeks ago

Laravel 11 School Management System

In this tutorial, we will teach you how to create a simple school management system…

3 weeks ago

How to Make Admin Panel Using React MUI

I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…

1 month ago

Install Laravel Breeze for Authentication Using Laravel 11

In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…

1 month ago