
Define functional requirements for a Java Spring Boot e-commerce app by detailing admin, editor, salesperson, shipper, assistant, visitor, and customer roles and their front-end and back-end capabilities.
Identify key technical requirements for an e-commerce app, including accessibility, availability, security, performance, and scalability, and implement authentication, authorization, password security, secure payments, and fast responses.
design a responsive, intuitive e-commerce user interface that adapts to devices, with a top-left logo, header navigation, search, pagination, and standard web forms for front-end and admin.
Explore the database design for an e-commerce app, outlining core tables such as users, roles, categories, products, orders, order details, cart items, customers, addresses, reviews, and settings, created per module.
Explore the system architecture for a Java Spring Boot e-commerce app, comparing local development with production on Heroku, including standalone jars, MySQL, and S3 storage.
Upgrade to the latest versions of Java Development Kit (Oracle JDK 21), Spring Tool Suite, MySQL 8.2.0, Git 2.43.0, and Maven 3.9.6, with guidance in the December 2023 Technologies Update.
Install OpenJDK 15 on Windows by downloading the zip, verifying the SHA256 checksum, extracting the archive, and configuring JAVA_HOME and PATH for java and javac, with Heroku compatibility.
Install Spring Tools 4, download and run the self-extracting jar for Eclipse-based STS4, and launch the IDE. The tool runs on its JVM, with a JDK required for the installer.
Install and configure MySQL community server on Windows 10, verify the installer checksum, and set up MySQL Workbench to manage databases and connect to the server.
Install git on Windows by downloading from git-scm.com, running the setup with default options, and verify with a command prompt to clone projects from GitHub.com.
download and extract the apache maven binary zip from maven.apache.org, then configure the system path to include the bin directory and test mvn to verify installation on windows.
select and set the java version for your spring starter project by choosing among the latest LTS versions and updating the pom.xml java.version property.
Recognize that the course uses Spring Boot 2.4.1, which is outdated; upgrade to Spring Boot 3.2.0 as of December 2023, and consult the technologies update section to update code.
Create a multi-module Maven project for an e-commerce app in Spring Tool Suite, with ShopmeCommon as shared code and two Spring Boot apps ShopmeBackEnd and ShopmeFrontEnd under ShopmeWebParent.
Access referential GitHub project for java spring boot e-commerce course, a private repo; share your GitHub username or email via Udemy private message to clone by tag or commit hash.
Download the referential code from GitHub as a zip archive, extract it, and import the Shopme project into your IDE, noting that the master branch is the main referential version.
Learn to browse central project code in a web browser without cloning, navigate the remote repository on GitHub, search files, and review change history.
Clone the referential Shopme project from GitHub using git and Maven, build with mvn install, and run ShopmeBackEnd and ShopmeFrontEnd to view the admin and shopping interfaces.
Learn to clone the RAF central code from GitHub using a personal access token instead of a password. Use the token in git command line and in Eclipse IDE.
Clone the referential Shopme project from GitHub into Eclipse or STS, import backend and frontend, and run the Spring Boot app on port 8080 (/ShopmeAdmin) and port 80 (/Shopme).
Learn to check out a specific commit from a GitHub project using the command line, by downloading a commit file and running git clone and git checkout with the hash.
Learn to disconnect a project from a remote GitHub repository to protect code, using IDE options (Eclipse or Spring Tool Suite) or git to remove origin and delete .git directory.
Explore the logical architecture of the e-commerce app, detailing the view, controller, service, and repository layers, and how Thymeleaf, Spring MVC, Spring Data JPA, Hibernate, and JDBC connect the stack.
Design admin home page for Shopme, featuring a header with logo and menus, a current user display, a Shopme control panel heading, summary information in the content, and a footer.
Learn to configure Bootstrap and jQuery in a Spring Boot project using webjars via Maven, enabling offline use and content delivered through Thymeleaf for a responsive, mobile-friendly admin UI.
Add a logo and a responsive header menu for the admin home page with a Bootstrap navbar. Place logo under static/images and include menu items Users, Categories, Brands, Products, Customers.
Learn to set up a Spring Boot app with Webjar dependencies for Bootstrap and jQuery, enable Spring DevTools for automatic restarts, and serve static resources using Thymeleaf th:src and th:href.
Test the Shopme applications on a mobile device by connecting to the same LAN and using your computer's IP address with port 8080 to access ShopmeAdmin and front-end at /Shopme.
Implement the shopme admin user management module, enabling admins to create, edit, delete, and list users with search, sort, and pagination, manage roles, and export to excel, pdf, and csv.
Understand the technical design of the user module, including a many-to-many relationship between users and roles via a users_roles table, email uniqueness checks, and controllers, services, and repositories across layers.
Explore updates in spring data jpa for spring boot 3.2.0+, including javax to jakarta migration, no longer needing hibernate dialect for mysql, and mysql-connector-j dependency changes.
Create a MySQL database named shopmedb, add Spring Data JPA dependency, and configure a Spring Boot data source via application.properties with ddl-auto update, show-sql, format_sql, and MySQL8Dialect.
Define the Role entity and repository, and write unit tests to auto-create the roles table with Hibernate DDL, then verify inserts via Data JPA tests.
Code the user entity and repository with Spring Data JPA and Hibernate, map to users and users_roles, and implement unit tests for create, retrieve, update, and delete.
Code the user listing function for the app. Implement listAll in UserService, create UserController for /users, and render a Thymeleaf table with id, email, first name, last name, roles, enabled.
Implement create user function in the ShopmeAdmin app, building a Thymeleaf form for email, first and last names, password, roles, and enabled status; save to database and show a success message.
Update your Spring Boot 3.x and Spring Security 6.x apps by migrating from WebSecurityConfigurerAdapter to a SecurityFilterChain with Lambda DSL, configuring HttpSecurity and securing requests, and learn updated WebSecurityConfig code.
Encode user passwords with the spring security bcryptpasswordencoder to replace plain text storage, configure security, and test encoding before persisting new users.
Learn to enforce unique user emails in a Java Spring Boot e-commerce app by implementing getUserByEmail and isEmailUnique, exposing a REST endpoint, and validating with AJAX, CSRF, and bootstrap modal.
Learn to integrate Font Awesome icons in a Spring Boot project by hosting Font Awesome files and applying icons such as fa-portrait, fa-edit, fa-trash, and fa-check-circle with size and color.
Learn to implement the update user function in the Shopme Admin, covering the edit form, optional password in edit mode, email uniqueness checks, and persisting updates to the database.
Learn to implement a delete user feature in the ShopmeAdmin app by wiring controller, service, and repository with countById and deleteById, plus a Bootstrap and jQuery confirmation dialog.
Implement updateUserEnabledStatus in controller, service, and repository to toggle a user's enabled status via a custom update query, and adjust the listing page with enable/disable links, messages, and tests.
Explore the user photos upload function in the Java Spring Boot e-commerce course, including optional uploads for new and edited users, thumbnails, per-user directories, and s3 deployment notes.
Learn to fix images not displayed in a Spring Boot e-commerce app by handling spaces in file names, adjusting spring.mvc.pathmatch.matching-strategy to ant-path-matcher, and correcting run configurations on IntelliJ and macOS/Linux.
Import sample users data for the user management module to support upcoming pagination, filtering, sorting, and exporting, using the Shopme sample users data zip file and SQL script.
update to the spring data jpa change in spring boot 3.2 or newer: paging and sorting repository no longer extends crud; update to extend both crud and paging and sorting.
Master pagination for the users list with Spring Data JPA, implementing paging in the repository, service, and controller, and rendering Bootstrap pagination with total elements and pages.
This lecture demonstrates implementing sortable, paginated user lists in a Spring Boot app by making table headers clickable, using sortField and sortDir, and showing up/down icons.
Implement a keyword filter for the users list in a Java Spring Boot app, enabling search across id, email, first name, and last name with pagination and sorting.
Refactor code by using Thymeleaf fragments to simplify sortable table headers and pagination links, then implement a redirect to show only the affected user after saving via a filter.
Implement an export to csv feature that enables admins to download a timestamped csv of all users (excluding password and photos), sorted by first name.
Export users to excel xlsx in a spring boot app using Apache POI, with headers user id, e-mail, first name, last name, roles, enabled, sorted by first name, via /users/export/excel.
Export a PDF of all users sorted by first name from the admin listing by clicking the export to pdf link, using UserPdfExporter with OpenPDF to generate a six-column table.
Adapt the Java Spring Boot e-commerce users listing for mobile using CSS media queries, swapping between a table and a simple listing and updating icons and Thymeleaf fragments.
Test the Shopme admin user listing on a real iPhone 7 Plus, exploring mobile responsiveness, user edits, creation, PDF export, search, and enable/disable actions.
Explore Spring Data JPA with Hibernate for repositories, pagination, and queries; secure passwords with BCrypt; build RESTful services with @RestController and Thymeleaf with Bootstrap templates, CSV, Excel, and PDF generation.
Learn how to upgrade from Spring Security 5.4.2 to 6.2.0, with notes on deprecated code and the December 2023 update section guiding the upgrade process.
Implement user authentication by enforcing login for all users, supporting roles (salesperson, admin, shipper, assistant, editor), enabling account updates, remember me, and logout, with admins controlling email and role changes.
Code and configure a custom login page in a Spring Boot e-commerce app, replacing the default security login, wiring /login, and using email as the username parameter.
This lecture covers spring security code for spring boot 3.x and 6.x, including securityfilterchain and websecuritycustomizer, ignoring static resources, and enforcing authentication via a lambda-based login with email as username.
Configure Spring Security to authenticate users from the database using a custom login page, implementing ShopmeUserDetails and ShopmeUserDetailsService with a DaoAuthenticationProvider.
Update your project to Spring Boot 3.x with Spring Security 6.x, changing the Thymeleaf Extras for Spring Security 6 dependency to thymeleaf-extras-spring-security6 and reviewing the December 2023 Technologies Update.
Display the logged-in user's full name at the top right using Thymeleaf extras security integration with Spring Security, and reveal a logout link via a dropdown menu.
Explore the updated Spring Security logout implementation in Spring Boot 3.x with Spring Security 6.x, featuring a SecurityFilterChain bean and lambda DSL configuration of logout that omits the and() method.
Implement logout with Spring Security using a hidden POST form and CSRF token, wired via jQuery to submit on logout, and show a logout message on the login page.
Refactor the e-commerce pages by creating Thymeleaf fragments for the head, navigation, and footer. Move common JavaScript to a shared common.js and apply fragment reuse to reduce duplication.
Update spring security to enable remember-me for login by updating the WebSecurityConfig with rememberMe(), using DSL lambda syntax, and setting the key and token validity for the ShopmeBackEnd application.
Enable remember me on the login page and configure Spring Security to use hash-based tokens, encoding username and password in a remember-me cookie with a two-week default expiration.
Update account details using a dedicated account controller, Thymeleaf form, and Spring Security to modify first name, last name, password, and photos while keeping email and roles read-only.
Test user authentication on an iPhone by logging into the Shopme Admin app, viewing account details, updating profile photo, and switching users to verify logout and updates.
Review key notes on implementing user authentication with Spring Security, including configuring WebSecurityConfigurerAdapter, login pages, csrf protection, remember-me options, and using @AuthenticationPrincipal to access user details.
Define roles admin, editor, salesperson, shipper, and assistant with module permissions and build an access rights table to drive the Shopme Admin navigation menu based on user roles.
Align Spring Boot 3.x and Spring Security 6.x by updating WebSecurityConfig to authorize /users with requestMatchers, replacing anMatchers, and accessing the new code in the Resources folder.
Learn how to implement user authorization with Spring Security, using hasRole and hasAuthority, configure http security, and render access controls in Thymeleaf based on principal authorities.
Refactor the user authorization module by reorganizing java packages, moving exporter and controller classes, restructuring html templates and shared javascript into a new common_form.js, and validating export and view permissions.
Test user authorization on a smartphone within the java spring boot e-commerce course by signing in as admins and various roles to verify menu access and unauthorized page handling.
Create and implement custom error pages in the ShopmeAdmin application to display user-friendly messages for 403, 404, and 500 errors, matching the app’s UI.
Explore Spring Boot logging architecture, configure levels and rolling log files, enable debug and trace modes, and implement SLF4J logging in code for ShopmeAdmin.
Enable category management for admin or editor roles on ShopmeAdmin, create, update, list with sort, pagination, delete, and export Excel, PDF, and CSV, using hierarchical categories: name, image, and parent.
Explore the technical design of the category module for the Shopee admin app, detailing the categories table, alias-based urls, image storage, and parent relationships.
Create the category entity with a 1-to-1 parent and 1-to-many subcategories, generate the categories table via Hibernate, and implement the category repository interface for paging and sorting.
Learn to write unit tests for the category repository in Spring Data JPA, creating top-level and subcategories, querying by id, and printing categories in a hierarchical form.
Write initial code for listing categories, displaying id, name, alias, and enabled status from the database, with a listing page and spring security restricting access to admin and editor roles.
Build a category form in java spring boot ecommerce, enabling create and update with name, alias, image, and enabled status, plus a hierarchical parent category selector.
Implement a post handler to save a new category in the database, upload its image to an external directory, and show a success message on the listing page.
Learn to list categories in hierarchical form with root and subcategories, display category images, and expose the image directory via MVC configuration while updating repository and service logic.
Implement the update category function in a Java Spring Boot e-commerce app, allowing editing of name, alias, parent, image, and enabled status, saving changes and handling category not found exceptions.
Enforce unique category names and aliases in a java spring boot e-commerce app by updating the repository and service checks, with unit tests and bootstrap modal warnings.
Sorts categories in a Java Spring Boot e-commerce app by name, prioritizing root categories and sorting subcategories, with ascending/descending toggle on the categories listing page; updates repository, service, and controller.
Update the category enabled status using a custom repository query, modify the service and controller, and verify changes on the category listing page and in the database.
Learn to implement the category delete function in a Java Spring Boot e-commerce app, showing options only for leaf categories, refactoring logic into a module, and removing image directories.
Implement pagination for the Catalyst categories list by showing four top-level categories per page with bottom navigation, ensuring sorting compatibility, and refactor into a reusable fragment with url parameters.
Implement a category search filter using like match on names, integrate with pagination and sorting, display non-hierarchical results, and handle empty results with clear messaging.
Import sample categories data by downloading a zip, extracting images and an Excel of 31 categories, and running a SQL script to populate the database after truncating the categories table.
Export categories to csv in category module, mirroring the user export, with id and name in hierarchical form with spaces, and move the abstract exporter class to the package commitment.
Make the categories listing page fully responsive by hiding the earliest column on medium screens and showing a symbol listing on small screens, using deep sections with list details.
Refactor your listing page fragments into reusable components by parameterizing models, entity names, and URLs to reduce duplication and improve maintainability across users and categories pages.
Implement the category module with 1-to-1 and 1-to-many relationships to build a hierarchical structure via a recursive algorithm, and test the service layer with JUnit and Mockito.
NOTES: This course has been updated to Java 21, Spring Boot 3.2.0 and Spring Security 6.2.0.
Welcome to "Java Spring Boot E-Commerce Ultimate Course" instructed by me, Nam Ha Minh - a certified Java developer who have been programming with Java technologies for more than 19 years.
I'm very glad that you have found the most sophisticated and comprehensive course ever on web development with Java, Spring framework, Spring Boot and related technologies. Let me explain why this course is perfect for those who want to master practical, job-ready programming skills needed to be a professional Java developer and pursuit a career in software development.
"Really wonderful course for learn how to develop complete web application with Java Spring Boot and to get good ECommerce domain knowledge. Glad I found this course" - said student Arunkumar.
By learning this course, you will gain Full-stack development experience in programming a real-life shopping web application using the latest technologies such as Java, Spring Boot, Hibernate, Thymeleaf, Bootstrap, jQuery, HTML, RESTful Webservices... putting all these pieces together for building professional applications beloved by the end users, and bring revenue to businesses.
The modules you will learn to build in the Admin application are: Users, Categories, Brands, Products, Customers, Shipping, Orders, Sales Report, Reviews, Questions, Settings.
The modules you will learn to build in the Shopping application are: categories listing, product details, search products, shopping cart, checkout, manage orders, tracking orders, customer registration.
You also learn how to deploy the e-commerce webapp on Heroku cloud platform, with user's uploaded files stored on Amazon S3 server.
"This is one of the best, if not the best course on Udemy. Nam is a great teacher and won't hesitate to share his enormous knowledge. Highly recommended!" - student Damjan Bozhinoski
You will be a master of the following technologies by the end of this course:
- Spring framework development with Spring Boot
- Spring Data JPA and Hibernate framework
- Spring Security for authentication and authorization
- Spring OAuth for social login with Facebook and Google
- Spring Mail for sending customer registration confirmation and order confirmation
- PayPal Checkout API for capturing payment from customer
- Google Chart API for drawing charts of sales report
- JUnit, AssertJ and Mockito in unit testing
- Spring RESTful Webservices
- Bootstrap 4, HTML5 and jQuery 3
- Amazon S3 APIs
- Deployment on Heroku (AWS)
By completing this course, I'm sure that you will gain practical, hands-on programming experience and become a professional Java web developer. Also with job-ready skills earned, I'm sure that you will land on a development job which you deserve - like many students shared with me before. Below are some of them:
"I just wanted to let you know that I got the job and one of the reasons is you." - student Rajesh Kumar
"I just want to say thank you. Your Spring Boot tutorial is just amazing. I was struggling to find a developer job 4 months ago, so I decided to enroll your course on Udemy. After I finished the course, now I got a job. I want to share the happiness with you. I couldn't do it without you. Thank you so much!" - student Johnny Liang.