Skip to content

An online shopping website implemented with Java SSM.

Notifications You must be signed in to change notification settings

missYang33/tmall_ssm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tmall_SSM

This is a Java web project which imitates the famous Chinese online shopping website Tmall. It supports all the major functions of any shopping websites, such as user register, login, logout, list products by category, search by key word, check product in detail and it also implements the entire process of shopping, like add to cart, checkout, generate orders, keep track of orders, review products so on and so forth.

Getting Started

Just like building many other Java projects, before running it, you need to install Java and a suitable IDE on our PC.

Prerequisites

Firstly, you need to install Java JDK, JRE and set some environmental variables on your operating system. Here are some Java install instructions.

Install Java JDK in Windows

Install Java JDK in Ubuntu

The next step is to select an IDE, I recommend you to use Eclipse or IntelliJ IDEA. Here are the links of their download page.

Download Eclipse

Download IntelliJ IDEA

Installing

After copying the project on your local machine, you need to add it into your IDE as a project.

The process is simple. Take IntelliJ IDEA as an example, click File->Open File or Project, select the "pom.xml" file under the main folder, which allows the IDE to open the project with Maven.

To run the project, you need to install Maven at first:

Install maven in Windows

Install maven in Ubunto

Next in the Run/Debug configuration page, you must add a maven builder.

As for the maven builder, you should set the setting file and repository as the folder where you install the maven, like:

mavenFolder\.m2\settings.xml
mavenFolder\.m2\repository

You should use tomcat as server and set it listening to the 8080 port as default. To start the server, you can set the command line parameter as:

tomcat7:run

Once you start the server, you can visit the home page by typing the URL below on your browser:

http://localhost:8080/tmall_ssm/home

Code Structure

This system is quite complex, so I separate the code into several folders and put the backend and frontend codes into two separate directories.

Back-End

The backend is implemented with Java and all the codes are under the org.pzy.tmall source directory. According to their function and responsibility, they are distributed into 6 sub-directories.

  • controller : all the Spring MVC controllers, which directly handle the HTTP request.
  • interceptor: check user login status, being called before requests are handled by controller.
  • mapper: a series of interfaces, used to execute SQL command defined in .xml files to CRUD data.
  • pojo: all the data types, which are in accord with the data defined in database.
  • service: define several APIs called by controller, handle business logic by using the method in mapper.
  • util: several utilities to process special kinds of data like uploaded images.

Front-End

All the frontend codes are written in .jsp files with Java, Vue.js, HTML, Bootstrap and jQuery. They are distributed in three main folders;

  • admin: all the codes of data management pages, which are only accessible for administrators.
  • fore: the pages visible for all normal customers.
  • include: some pages that are integrated into the pages in previous folders, and some shared pages like head and foot.

Built With

Versioning

Version-1.0

Authors

  • Zeyu Pan Initial work - Github

License

This project is licensed under the MIT License.

About

An online shopping website implemented with Java SSM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 97.6%
  • CSS 2.4%