All Projects → bzdgn → product-catalog-spring-mvc-demo

bzdgn / product-catalog-spring-mvc-demo

Licence: other
A Product Catalog Demonstration Project Using Spring MVC and Mongo DB

Programming Languages

java
68154 projects - #9 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to product-catalog-spring-mvc-demo

Java Course
Self paced course for Java Engineers
Stars: ✭ 103 (+543.75%)
Mutual labels:  maven, spring-mvc
Dhis2 Core
DHIS2 Core. Written in Java. Contains the service layer and Web API.
Stars: ✭ 199 (+1143.75%)
Mutual labels:  maven, spring-mvc
Ibase4j
Spring,SpringBoot 2.0,SpringMVC,Mybatis,mybatis-plus,motan/dubbo分布式,Redis缓存,Shiro权限管理,Spring-Session单点登录,Quartz分布式集群调度,Restful服务,QQ/微信登录,App token登录,微信/支付宝支付;日期转换、数据类型转换、序列化、汉字转拼音、身份证号码验证、数字转人民币、发送短信、发送邮件、加密解密、图片处理、excel导入导出、FTP/SFTP/fastDFS上传下载、二维码、XML读写、高精度计算、系统配置工具类等等。
Stars: ✭ 1,548 (+9575%)
Mutual labels:  maven, spring-mvc
Shopping Management System
该项目为多个小项目的集合(持续更新中...)。内容类似淘宝、京东等网购管理系统以及图书管理、超市管理等系统。目的在于便于Java初级爱好者在学习完某一部分Java知识后有一个合适的项目锻炼、运用所学知识,完善知识体系。适用人群:Java基础到入门的爱好者。
Stars: ✭ 4,130 (+25712.5%)
Mutual labels:  maven, spring-mvc
IDEAPractice
Java练习 - Java基础知识,面试题,小demo,长期积累 | intellij idea + maven + tomcat
Stars: ✭ 45 (+181.25%)
Mutual labels:  maven, spring-mvc
Perfect Ssm
🍇更完善的Spring+SpringMVC+Mybatis+easyUI后台管理系统(RESTful API+redis)
Stars: ✭ 606 (+3687.5%)
Mutual labels:  maven, spring-mvc
Javadevjournal
Source code for the tutorials published on the Javadevjournal site.
Stars: ✭ 141 (+781.25%)
Mutual labels:  maven, spring-mvc
wislove
Java 服务端api解决方案,处理部分通用业务逻辑。包括用户中心,支付,订单,IM相关,内容管理,角色权限授权。以及分库分表的处理,RPC分布式的解决方案等。一个人慢慢做
Stars: ✭ 14 (-12.5%)
Mutual labels:  maven, spring-mvc
ark.db
Small and fast JSON database for Node and browser. 😋
Stars: ✭ 65 (+306.25%)
Mutual labels:  mongo, mongo-db
mongoose-auto-increment-reworked
An auto-incrementing field generator for Mongoose 4 & 5
Stars: ✭ 17 (+6.25%)
Mutual labels:  mongo, mongo-db
Highdsa
2018年本科毕设项目,已更新所有开发和部署文档。基于Dubbo、SSM、Shiro、ELK、ActiveMQ、Redis等实现的一套高可用、高性能、高可扩展的分布式系统架构,实现可支持业务的基础公共服务,API使用Restful风格对外暴露。已经实现的包括:发送邮件服务、FastDFS文件存储服务、ELK实时日志查询服务、Redis缓存服务、Mybatis数据库、阿里短信推送、Goeasy消息推送、Druid监控、ActiveMQ消息队列、shiro权限认证、cas单点登录、权限配置web系统、移动端后台系统。持续更新中......
Stars: ✭ 385 (+2306.25%)
Mutual labels:  maven, spring-mvc
littlefisher-system
个人博客
Stars: ✭ 19 (+18.75%)
Mutual labels:  maven, spring-mvc
Ssm booksystem
ssm demo,ssm详细教程,SSM简明教程:简单的十步教你搭建人生第一个SSM框架[ SSM框架整合教程(spring+spring mvc+mybatis+redis+maven+idea+bootstrap) ]
Stars: ✭ 355 (+2118.75%)
Mutual labels:  maven, spring-mvc
Springboard
Spring Boot based production grade starter kit.
Stars: ✭ 59 (+268.75%)
Mutual labels:  maven, spring-mvc
Yan
使用Maven构建,整合Dubbo+Zookeeper+SpringMVC+Spring+MyBatis+Redis支持分布式的高效率便捷开发框架
Stars: ✭ 293 (+1731.25%)
Mutual labels:  maven, spring-mvc
Ssm Demo
🍌Spring+SpringMVC+Mybatis+easyUI实现简单的后台管理系统
Stars: ✭ 1,639 (+10143.75%)
Mutual labels:  maven, spring-mvc
eksi
Eksi sözlük crawl,stat , api calismalari
Stars: ✭ 25 (+56.25%)
Mutual labels:  maven, spring-mvc
JavaEE
🔥⭐️👍框架(SSM/SSH)学习笔记
Stars: ✭ 33 (+106.25%)
Mutual labels:  maven, spring-mvc
Spring Framework Petclinic
A Spring Framework application based on JSP, Spring MVC, Spring Data JPA, Hibernate and JDBC
Stars: ✭ 251 (+1468.75%)
Mutual labels:  maven, spring-mvc
Spring-SpringMVC-MyBatis-Maven
这是平时基于Maven的用于spring整合相关内容的学习demo
Stars: ✭ 74 (+362.5%)
Mutual labels:  maven, spring-mvc

01 Screenshots;

01-A) Product List Page

alt text

01-B) Product Details Page

alt text

01-C) Product Details Page Confirmation Modal

alt text

01-D) Shopping Cart Page

alt text

01-E) Search Functionality

alt text

01-F) List Products By Selected Category

alt text

02 Project Startup

Following maven archetype is used to create web application

` mvn archetype:generate -DgroupId=com.levent.pcd -DartifactId=ProductCatalogDemo -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

mvn archetype:generate -DgroupId=com.levent.pcd -DartifactId=ProductCatalogDemo -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false`

03 Project Setup

  • MongoDB is needed for this project
  • On windows, simply run the command below (notify that you have to specify a dbpath parameter)

mongod --port 27017 --dbpath D:\MONGOTEST\data

I'm using the command below on my windows machine;

C:\Program Files\MongoDB\Server\3.0\bin>mongod --port 27017 --dbpath D:\MONGOTEST\data

04 Project Data

  • Database name is specified on servlet-config.xml (WEB-INF/config/servlet-config.xml), and set to levent. You can change or set an arbitrary name for it.

  • Use the database name specified on servlet-config.xml

use levent

  • Create a collection named products with the following command, you can run it on mongo client;

db.createCollection('products')

  • Populate the collection with the following command, just copy and paste it on mongo client. Also notify that database data is located on src/resources/database-data folder;

db.runCommand({ insert: 'products', documents: [ { _id: '1', productCode: 'AX329T', categories: ['men'], productName: 'Light Brown Men Shoe 1', imageUrl: '01_men_one.jpg', price: 68.39, size: 43, color: 'lightbrown' }, { _id: '2', productCode: '6X3D93', categories: ['men'], productName: 'Brown Men Shoe 2', imageUrl: '02_men_two.jpg', price: 81.99, size: 41, color: 'brown' }, { _id: '3', productCode: 'NX3G66', categories: ['men'], productName: 'Dark Brown Men Shoe 3', imageUrl: '03_men_three.jpg', price: 70.26, size: 42, color: 'darkbrown' }, { _id: '4', productCode: '37Y29D', categories: ['women'], productName: 'Black High Heel Women Shoe', imageUrl: '04_women_one.jpg', price: 99.84, size: 36, color: 'black' }, { _id: '5', productCode: '223JDH', categories: ['women'], productName: 'Black Women Shoe 2', imageUrl: '05_women_two.jpg', price: 102.67, size: 37, color: 'black' }, { _id: '6', productCode: '7DGFF1', categories: ['men', 'children', 'boy'], productName: 'Black Blue Boy Shoe 1', imageUrl: '06_men_children_01.jpg', price: 51.14, size: 3, color: 'blue' }, { _id: '7', productCode: 'DJ7CY3', categories: ['men', 'children', 'boy'], productName: 'White Cream Boy Sport Shoe 2', imageUrl: '07_men_children_02.jpg', price: 43.36, size: 4, color: 'cream' }, { _id: '8', productCode: '3HDAA7', categories: ['girl', 'children', 'women'], productName: 'Girl Pinky White Shoe 1', imageUrl: '08_girl_children_01.jpg', price: 45.44, size: 2, color: 'white' }, { _id: '9', productCode: 'JFJE7X', categories: ['girl', 'children'], productName: 'Girl Pinky Black Shoe 2', imageUrl: '09_girl_children_02.jpg', price: 55.24, size: 3, color: 'pink' } ] })

05 Explanation

There are several packages due to N-tier application model. Front Controllers are located on controller package. Controller classes invokes classes under Service and Business packages. Business package is an additional abstraction for service. Service layer uses Repository package classes and that's all.

There is only one model class, Product. However for session scoped shopping cart data, there is also ShoppingCartMap class, and also there is an ShoppingCartEntry class which I use to store the orders per Product Code, it's actually a map.

There is a very simple Strategy Pattern implementation on ShoppingHandlerImpl class. ShoppingHandlerImpl has a price handler instance which is actually a PriceStrategy interface. This is a very primitive demonstration of Strategy Design Pattern.

There are some several Rest Endpoints under RestServicesController class. One of them with request mapping services/addToCart is used for the update of session scoped variable on product details add-to-cart functionality, see product-details.jsp view under WEB-INF/jsp

I used twitter bootstrap on for page layout for a better view and responsive design.

06 Further Notes

Because that I need trivial image data to run the project, I've fetched some images from google and none of them belongs to me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].