Giter Club home page Giter Club logo

jaygajera17 / e-commerce-project-springboot Goto Github PK

View Code? Open in Web Editor NEW
460.0 8.0 460.0 16.87 MB

This a web application Java Based Beginner level project To developing the e-commerce website to Buy/sell the Food Item. We use the Spring Boot to build the back-end part

Home Page: https://www.youtube.com/watch?v=c6WWdINWSlI&feature=youtu.be

Java 100.00%
eclipse jdbc spring spring-boot spring-boot-project spring-mvc spring-projects e-commerce-project-in-java spring-web-project java

e-commerce-project-springboot's Introduction

Old Version

New Upgrade ( what's new)

  • Hibernate configuration added( database and tables automatically create when run the project)
  • Service classes provide reusable services throughout project
  • dao classes interact with database
  • bug fixed ( product image, security , etc..)
  • support in both eclipse & intellij ide
  • overall redesign entire code that help reusability.
  • disclaimer: currently working on this branch so there may be some bug related to endpoint, and working on cart logic.

Quickstart

  1. Clone the repository
  2. Open the project in your IDE: IntelliJ IDEA (recommended) or Eclipse
    • If you are using IntelliJ IDEA, make sure the IDE opens project as Maven and recognizes the project as a Spring Boot project. Also, you must change the working directory of the project so that the views (the actual web pages to be shown) are found by Spring Boot (check out Web Directories IntelliJ IDEA.
  3. Make sure you are in the JtProject directory
  4. Configure the database connection in application.properties file (check the Database section below for more info)
  5. Run the project (by running the main method in JtSpringProjectApplication.java)
  6. Open http://localhost:8080/ in your browser!
    • If you ran the basedata.sqlscript on the database, you can log in with the following credentials as admin; otherwise you'll have to manually create an admin user in the database:
      • Username: admin
      • Password: 123
    • Log in as a normal user:
      • Username: lisa
      • Password: 765

Database

MySQL or MariaDB can be used as the database for this project. The database connection can be configured in the application.properties file, with the appropriate values for the following properties: (you'd better use another username not root)

    db.url=jdbc:mysql://[ip address of db]:[port of db]/ecommjava?createDatabaseIfNotExist=true
    db.username=[username]
    db.password=[password, if any]

if you met the error java.lang.IllegalArgumentException: Could not resolve placeholder 'db.driver' in value "${db.driver}", maybe you should change your mysql-connector-java version in pom.xml file according to your mysql version, don't forget to reload your Maven project.

Having done that, you must create some base data in the database. You can do that by running the basedata.sql script on the database. Check out Google for how to do that, because it depends on what tool you are using to access said database.

Web Directories

The views are located in src/main/webapp/views, but for some reason, Spring Boot doesn't recognize that directory. To remedy this, you must change the working directory of the project in your IDE. If you're using IntelliJ IDEA, follow these steps:

  1. Click on the "Edit Configurations..." button in the top right corner of the IDE
  2. Click on the JtSpringProjectApplication configuration
  3. Change the "Working directory" option (if not present, click on "Modify Options" and select from the list) to the $MODULE_WORKING_DIR$ macro
  4. Click "Apply" and "OK"

When you run the project, the views should be found by Spring Boot and you should see a login page in http://localhost:8080/ (if not logged in previously)! configurations

Workflow

  • image

Controller

  • control the endpoint and also send data to view( we use ModelAndView method)
  •   public String adminlogin() {
      	
      	return "adminlogin";
      }```
    
  • whenever /login url is hit , src->main->webapp-> adminlogin.jsp file execute

Models

  • represent data as entity and relationship among them.

View

  • receive data from controller and show with frontend.

Endpoints

Spring Boot

For any information about Spring Boot, here are some useful links!

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Preview

image image image

Link

  • π—¬π—Όπ˜‚π˜π˜‚π—―π—² π—½π—Ώπ—Όπ—·π—²π—°π˜ π˜ƒπ—Άπ—±π—²π—Ό π—ͺ𝗼𝗿𝗸𝗢𝗻𝗴 𝗗𝗲𝗺𝗼 + π˜€π˜π—²π—½ π—―π˜† π˜€π˜π—²π—½ π—²π˜…π—²π—°π˜‚π˜π—Άπ—Όπ—» 𝗹𝗢𝗻𝗸 ( old version )::--- click here youtube

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.