This is a demo project for practicing Spring + Thymeleaf. The idea was to build some basic shopping cart web app.
It was made using Spring Boot, Spring Security, Thymeleaf, Spring Data JPA, Spring Data REST and Docker.Database is in memory H2.
There is a login and registration functionality included.
Users can shop for products. Each user has his own shopping cart (session functionality).Checkout is transactional.
Folder src/resources/ contains config files for shopping-cart Spring Boot application.
There are several ways to run the application. You can run it from the command line with included Maven Wrapper, Maven or Docker.
Once the app starts, go to the web browser and visit http://localhost:8070/home
Admin username: admin
Admin password: admin
User username: user
User password: password
Go to the root folder of the application and type:
$ chmod +x scripts/mvnw
$ scripts/mvnw spring-boot:run
Or you can build the JAR file with
$ scripts/mvnw clean package
Then you can run the JAR file:
$ java -jar target/shopping-cart-0.0.1-SNAPSHOT.jar
Open a terminal and run the following commands to ensure that you have valid versions of Java and Maven installed:
$ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_102, vendor: Oracle Corporation
The Spring Boot Maven plugin includes a run goal that can be used to quickly compile and run your application.Applications run in an exploded form, as they do in your IDE.The following example shows a typical Maven command to run a Spring Boot application:
$ mvn spring-boot:run
To create an executable jar run:
$ mvn clean package
To run that application, use the java -jar command, as follows:
$ java -jar target/shopping-cart-0.0.1-SNAPSHOT.jar
To exit the application, press ctrl-c.
It is possible to run shopping-cart using Docker:
Build Docker image:
$ mvn clean package
$ docker build -t shopping-cart:dev -f docker/Dockerfile .
Run Docker container:
$ docker run --rm -i -p 8070:8070 \
--name shopping-cart \
shopping-cart:dev
It is possible to run all of the above with helper script:
$ chmod +x scripts/run_docker.sh
$ scripts/run_docker.sh
Folder docker contains:
Tests can be run by executing following command from the root of the project:
$ mvn test
Go to the web browser and visit http://localhost:8070/
You will need to be authenticated to be able to see this page.
Go to the web browser and visit http://localhost:8070/h2-console
In field JDBC URL put
jdbc:h2:mem:shopping_cart_db
In /src/main/resources/application.properties
file it is possible to change bothweb interface url path, as well as the datasource url.
源码地址来源: https://minglisoft.cn/honghu2/business.html /** * Copyright © 2012-2017 <a href="http://minglisoft.cn">HongHu</a> All rights reserved. */ package com.honghu.cloud.controller; import j
Ecommero Mobile Supported iOS versions: 11+ Supported Android versions: 6.0+ Download Admin Dashboard Reporting an issue Github Issues are used to track todos, bugs, feature requests, and more. Also c
温馨提示:该项目已开源,用户在项目基础上的所有操作、修改须进行标记,并保留原项目版权说明。 Dot Shopping Cart 是一款采用 .NET 开发的电子商务平台,集成强大的 CMS 模块可提供灵活的内容发布。
NodeJS Shopping Cart - NodeJS, Express, Express-Session, Express handlebars (hbs) Run locally on your machine You need to have installed Node and NPM. Clone this repository git clone https://github.co
MERN stack shopping cart Intro I started working on this app a while ago when I was still learning technologies used in this project, so please be aware thatthe codebase (and the whole app in general)
Shopping Cart Application with Microservices Approach Building microservices application (Shopping Cart Application - Polyglot for services) using Kubernetes + Istio with its ecosystem parts. Disclama
BugMall Shopping Cart 包含了所有能够建立、执行以及管理线上商店的功能,采用PHP开发。(非开源)