
Outline the architecture for a to-do list app using Postgres and Spring Boot, covering server and client sides, model-view-controller, orm with Hibernate, crud, authorization, and api testing with Postman.
install java 11 as the course's lts baseline, explain the six-month release cycle, and guide downloading from Oracle with sign-in and default installation.
Install the PostgreSQL server per your OS, use default configurations, set a password for the default user, and install pgAdmin to manage it via a browser at localhost.
Download and install IntelliJ to begin this course on PostgreSQL basic queries and Spring Boot integration.
Install Postman and use it for API testing. Create API endpoints in our project and test them with Postman, supporting GET, POST, PUT, and PATCH requests with easy authorization headers.
Install and configure Lombok, and enable annotation processing in settings to reduce boilerplate getters and setters on the server side.
Explore Lombok basics for clean Java code. Learn how annotations generate getters, setters, equals, hashCode, and immutable classes with no-args and all-args constructors that apply at class or field level.
Discover how the Spring framework enables dependency injection to decouple services from repositories. Learn constructor, setter, and field injection and key annotations like @Component, @Service, @Repository, @Controller, and @SpringBootApplication.
Build a to-do list app with users and tasks, implementing CRUD operations via Spring Boot rest APIs. Map with Hibernate, secure access with Spring Security, and use Liquibase and Lombok.
Set up a Spring Boot project for PostgreSQL by selecting dependencies like security, persistence API, REST API services, Lombok, and database migration tools, and prepare for config in later lessons.
Configure application properties for Postgres connection by defining data source credentials (username demo, password 1234), database platform, and port 5432, then set Hibernate and Liquibase settings to manage schemas.
Hibernate is a Java object-relational mapping tool that maps database tables to Java entities, using annotations like entity, table, column, id, and generated value to define relationships and fetch strategies.
Create a user model in the model package for PostgreSQL spring boot app, mapping User entity to users table with id, username, password, created date, and Role enum using Lombok.
Create todo item model class with id, userId, item, done, createDate, and updateDate using a serial generated primary key, local date time fields, equals and hashCode methods, and data annotation.
Liquibase overview: learn a migration library for relational databases that uses change sets and a database change log, enabling cross-database compatibility and rollback.
Learn liquibase implementation for model classes metadata by building a postgres change log with change sets, creating user and item tables with serial keys, and a master changelog.
Extend the JPA repository interface to access common create, update, and select operations automatically. Use derived query methods like findByUsername and custom queries with @Query and @Modifying for complex updates.
Create a Spring JPA repository implementation with a user and an item repository, extending JPA repository, including find by username and by user id where state is false.
Implement a Spring user service with a dedicated interface and implementation, inject the user repository, and provide create, update, find by username, and find all users with password encoding.
Explore how Spring Security handles secure login and authentication, including user details service, password encryption, and authorization rules, and implement these features with Spring Boot.
Implement a user details service in Spring Security by overriding the default, load user by username from the repository, assign roles with granted authorities, and return a secure user object.
Explore Spring Security's default configuration, including form login, basic auth headers, and standard login-logout flows, then customize with cross-origin resource sharing, public URLs, and session policies.
Explore the authentication module in spring security, including basic authentication, http filters, and authorization headers, decode base64 credentials, and understand how providers load users from database and validate passwords.
Demonstrates Spring Security authorization architecture, detailing interceptors, access decision managers and voters, and rules like permit, deny, authenticated, and remember me, plus default, consensus, and unanimous strategies.
Customize lab security by extending the security configuration, enabling cross-origin resource sharing, and defining public endpoints and admin-only access with basic, stateless authentication.
Learn how to build a rest controller in Spring Boot, use get, post, put, and patch mappings, handle requests with body and parameters, and return responses with response entities.
Implement a Spring-based user controller with dependency injection, exposing api/users for registration and login, validating unique usernames, returning appropriate response entities, and leveraging security principle and authorization tokens for login.
Test endpoints with Postman by starting the main class, then register (POST /api/user), login (GET /api/user/login) with basic auth, and change user (POST /api/user/change) to admin.
Implement an admin rest controller in Spring Boot, inject the user service, and expose a get all users endpoint secured for admin with basic authorization.
Create a todo item service in Spring Boot by implementing a service interface and its implementation, wiring with the todo item repository, and providing save, complete task, and list methods.
Implement a spring boot todo item controller with post, put, and get endpoints, secured by basic auth and testable via Postman, connecting to a service for create and update.
Hi there,
In this course, we will learn PostgreSQL queries and differences from other RDBMS (like oracle, mysql...). Also, we will learn the example integration with Spring Boot. All project will be implemented step by step so to understand it wont be tough for anybody.
When we learn them, we will also learn lots of technologies...
Liquibase: Database migration tool.
Hibernate: Object Relational Mapping with database.
Rest API: Restful Protocol endpoint API
We will go on with Java 8+
-----------------------
Hi guys,
In this lesson, we will talk about how we will go on in this course.
Also we talk about project structure that will be implemented in this course.
We will create a new project in this course.
And we will implement this project with using Spring Boot, PostgreSQL and Liquibase.
In our project, we will implement CRUD operations. And these CRUD operations will be requested from Postman.
Then This requests will be handled from Spring Boot.
Our project will be Todo List Application.
Our main operations will be user login, register and todo list.
Also, we will go on with role based application.
Our roles will be user and admin.
Users can create todo items.
Admins can see the all users.
And this all things will be provided with secure way in Spring Boot.
We will have two main components to implement our project.
These are server side and client side.
In Server Side:
Spring Boot will be main thing.
Model View Controller structure will be implemented with using Spring Boot.
Our MVC structure will work like that:
First of all, the entity classes will be created under model package.
Later, if model class is permanent, we will create a repository for it.
Then we will call repository from services.
Finally, we will call services from from controllers.
In Spring Boot, Data will be presented to client as API call so Spring Rest Controller will be used to handle it.
We will use PostgreSQL as Database.
We will see the basic operations in PostgreSQL. Like Create, update, select operations.
We will talk about database - schema relation.
We will talk about how we can handle auto_increment on PostgreSQL.
We will talk about data types in PostgreSQL.
We will also use Object Relational Mapping with Java Persistence API and Hibernate.
You know, We can map our database tables to objects with hibernate.
We will use JPA Repository and Crud Repository in Spring Boot.
So these repository templates will handle common database operations like save, update, find, delete.
With Spring Boot, we will also use Lombok library for clean code.
You know that we don't want to implement getter, setter, equals and hash code. So we can escape it using Lombok @Data or @Value annotation.
We will use Gradle To handle all dependencies on server side.
That's all about Server side.
Let's talk about Client Side.
We will create endpoints with Spring boot.
And on Client Side, we will test these endpoints with Postman.
With Postman, we will handle Authorization and basic Http methods.
Ok. That's all about our project architecture.
Thank you.