
Meet Ali, a senior software engineer with 15 years in IT, who introduces himself and invites you to learn full user login and registration with email validation.
Learn to build a full registration flow with email activation: disable accounts until confirmation, send a template welcome and verification email, and manage a 15-minute activation token.
Explore how the Spring framework enables enterprise Java development and how Spring Boot minimizes configuration with starters, dependency injection, and auto-configuration, letting you connect databases with minimal properties.
Explore how the Spring IOC container streamlines configuring and managing Java objects, handling lifecycles and enabling dependency injection and autowiring.
The container instantiates and manages Spring beans. The container coordinates the lifecycle of these beans, the backbone of an application, including components, repositories, services, and controllers.
Explore how the spring container manages a bean's life cycle from instantiation and dependency injection to destruction when the container closes.
Explore the spring framework's component annotation, which marks a class as a managed bean for automatic detection and dependency injection by the spring container.
Learn that @Repository, @Service, and @Component have no functional difference, as repository and service extend component. Use repository for data storage, service for business rules, and component for utility classes.
Explain how the @Autowired annotation lets Spring handle instantiation and inject dependencies by matching an interface to its implementation. Spares developers from writing boilerplate code by enabling automatic wiring.
Create a new Spring Boot project with Maven and Java 11, configure group and artifact IDs, and add Lombok, Spring Web, and Spring Security to enable login and registration.
Explore the project structure, from the main class and packages to dependencies such as Spring Boot Starter Data JPA and PostgreSQL. Learn to configure application properties and run Maven goals.
Configure the project by connecting a PostgreSQL database, setting up a data source in the IDE, updating application.yaml with the PostgreSQL driver and URL, and testing the connection.
Create a Java user entity using JPA and Lombok, with id generation strategies, a unique email, and a role-based authority system via user details for Spring Security.
Create a user repository by defining a repositories package and a user repository interface that extends JPA repository, exposing find by email and paging and sorting methods.
Implement the user service and registration service with Spring annotations, wire a user repository, and map registration DTOs to application users by email, validating uniqueness before saving.
Define a Spring authentication controller with rest controller annotation, a versioned API mapping, and a post mapping to /register that accepts a registration object and delegates to a registration service.
Create a security config class annotated as configuration and override the authentication manager and http security to wire a user details service and a password encoder, enabling form login.
Test the application by starting the app, viewing the login page, and registering a user with Postman to verify a created, encrypted password, default role user not enabled by default.
Create the token entity to support email-based authentication: define token fields, expiration, validation, and a many-to-one link to the user for registration workflows.
Create a token repository that extends JPA repository, include a find by token method, and support unique tokens for user registration and confirmation emails, then implement the service.
Register users and generate a token for account confirmation, with a token expiry of 10 minutes, saved transactionally to ensure rollback if either user or token fails.
Test the new changes by running the app and resending requests, validating that a token must be linked to a user, and verifying token and user data in the database.
Inject the confirmation email service and send a confirmation email after successful registration, including password encoding, transforming the user, and saving the user, with token generation and try/catch for errors.
Test the new changes by using Postman to send test emails, validate tokens, and confirm accounts via the authentication confirm endpoint to ensure email delivery and activation.
Implement the confirmation service to verify registration tokens, generate and send a new token if the old one is expired, and enable the user upon successful validation.
Learn how to internationalize a Spring Boot REST API by configuring message sources, locale resolvers, and translation files, and by using an accept-language header to serve localized content.
migrate spring security from web security config adapter to security filter chain in spring boot 2.7 and beyond, wiring a user details service, password encoder, and jwt filter for authentication.
The Spring Framework (Spring) is an open source application framework that provides infrastructure support for developing Java applications. One of the most popular Java Enterprise Edition (Java EE) frameworks, Spring helps developers create high performing applications.
In this Spring boot framework course you will learn how to build a complete and detailed backend application for user registration and login including email verification and activation with a temporary token.
During this course I will teach you
How Spring framework works
What are the steps to build a spring application
Understanding how spring security works
Send emails using HTML template to make it look better and professional
Use local email server for testing purposes
Understanding Spring security and authorisation
Securing your resources endpoints using role base authorisation
After finishing this course, you will able to
Understand how Spring framework works in details
Implement your own application using the spring framework
Know how to solve the exception and errors you face during applications development lifecycle
This course is for you if you want to learn how to build backend applications with full login and registration functionalities and understand how spring security works in deep.
What are you waiting for?! go ahead and inroll this course and share it with your friends.
Your instructor Ali