Production-oriented Java e-commerce web application built with Spring Boot, JSP, Spring Security, and Hibernate SessionFactory.
This project follows a layered MVC architecture and supports role-based access for admin and customer workflows.
A production-oriented Java e-commerce web application built with Spring Boot, JSP, Spring Security, and Hibernate — featuring role-based access for admin and customer workflows.
- Server-rendered e-commerce app (JSP views)
- Spring Security authentication and role-based authorization
- Custom Hibernate SessionFactory configuration (non-Spring-Data JPA runtime)
- MySQL-backed persistence with DAO and service layers
- Admin modules for products, categories, and customer listing
- User modules for registration, login, profile management, and product browsing
- Jenkins pipeline file included for CI/CD bootstrap
- Java 11
- Spring Boot 2.6.4
- Spring MVC
- Spring Security
- Hibernate ORM (via
LocalSessionFactoryBean) - JSP + JSTL + Tomcat Jasper
- MySQL 8 connector
- Maven
src/main/java/com/jtspringproject/JtSpringProject/
configuration/ # Security config
controller/ # MVC controllers
dao/ # Data access layer
models/ # Entities
services/ # Business layer
repository/ # Spring Data repository (partial)
HibernateConfiguration.java
JtSpringProjectApplication.java
src/main/resources/
application.properties
src/main/webapp/views/
*.jsp
basedata.sql
pom.xml
- Java 11+
- Maven 3.8+
- MySQL or MariaDB
git clone https://github.com/jaygajera17/E-commerce-project-springBoot.git
cd E-commerce-project-springBootUpdate src/main/resources/application.properties:
db.driver=com.mysql.cj.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/ecommjava?createDatabaseIfNotExist=true
db.username=your_db_user
db.password=your_db_password
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=update
entitymanager.packagesToScan=comRun basedata.sql against your database if you want initial categories/users/products.
Note: sample credentials in basedata.sql are development-only defaults.
mvn clean package
mvn spring-boot:runApp URL: http://localhost:8080/
If JSP views are not resolved, set the run configuration working directory to $MODULE_WORKING_DIR$.
//login/register/newuserregister/user/products/profileDisplay
/admin//admin/Dashboard/admin/products/admin/categories/admin/customers
- Admin routes under
/admin/**require roleADMIN - User routes require role
USER - Login pages:
- Admin:
/admin/login - User:
/login
- Admin:
- CSRF protection is enabled for form submissions
mvn clean verifyNotes:
mvn testrequires a reachable database because context startup initializes Hibernate and datasource beans.
A Jenkins pipeline is included in jenkins file with stages for:
- Checkout
- Build
- Test
- Deploy (template placeholder)
Adjust branch, deployment steps, and credentials for your environment.
Could not resolve placeholder 'db.driver':- Ensure all
db.*keys exist inapplication.properties
- Ensure all
- JSP pages not rendering:
- Verify working directory and
spring.mvc.view.prefix=/views/
- Verify working directory and
- Tests failing on startup:
- Start MySQL and verify connection credentials first
See the full roadmap in roadmap.md.
Current priorities:
- Solid foundation: CI, Docker Compose, contribution workflow, and test coverage.
- Complete e-commerce domain: cart, checkout, auth, search, and API docs.
- Industry patterns: caching, concurrency control, observability, and scalability.
- Long-term architecture: event-driven patterns and microservice decomposition guide.
demo video: https://youtu.be/c6WWdINWSlI
If this project helped you, please consider giving it a star on GitHub. Your support helps improve visibility and motivates future maintenance.


