
Discover why Spring Boot and React enable fast full-stack development with auto-configuration, database and ORM support, MVC and REST APIs; understand one-way data flow and the virtual DOM.
Install and configure the Lombok library for server-side development and enable annotation processing in IntelliJ to simplify getters and setters.
Explore Spring dependency injection and learn to decouple with abstractions, using constructor, setter, and field injection in Spring with annotations like @Configuration, @Autowired, @Component, @Service, and @Transactional.
Explore how to use the @RequestParam annotation in Spring to extract query, form, and header parameters. Learn about naming, required versus optional parameters, and default values for request parameters.
Explain how path variables map to Spring Boot method parameters using the PathVariable annotation, including default naming, customization, and optional versus required variables for REST APIs.
Develop and secure server side architecture with Spring Boot, implementing user, product, and transaction CRUD via MVC layers, Spring Security, Hibernate ORM, Liquibase migrations, and Lombok to reduce boilerplate.
Configure a Spring initializer project, selecting Gradle or Maven and Java version 2.1.7. Include model-view-controller, security, persistence with Hibernate, Rest repositories, and Liquibase for database migration, then import into Eclipse.
Examine the entity diagram for a product management system where users with roles purchase products via transactions; the model includes user, role as enum, product, and transaction with many-to-one links.
Explore how Hibernate maps database tables to Java classes with annotations like @Entity, @Table, @Column, @Id, and @GeneratedValue, and manage one-to-one, one-to-many, and many-to-many relations with fetch eager and lazy.
Create a product model class in the model package. Define id as primary key, and fields for name, price, description; implement equals and hash code with data annotations.
Create a transaction model class to map a database table, with ID as primary key, and many-to-one relations to product and user, plus a purchase date field, using data annotations.
Implement liquibase changes for user by creating a database change log and change sets to build a user table with name, first name, and role, with rollback dropping the table.
Implement Liquibase to create change sets for product and transaction models, including creating product and transaction tables and adding test data.
Explore how Spring Boot auto configuration enables JPA repositories for standard CRUD operations, custom queries via findBy methods, and query annotations for update and delete tasks.
Create a Spring user service by building an interface and implementation, injecting the user repository, and encoding passwords. Implement save, update, delete, find by username, and list all users.
Develop a product service by creating a service interface and implementation, add service and transactional annotations, inject the product repository, and implement save, update, and find all products.
Explore server-side role-based access control across user, musician, and admin roles, covering login, registration, profile viewing, product and transaction management, and user and product administration.
Explore rest controllers in spring boot and http servlets, using get, post, delete, put, and patch mappings to handle requests and responses via ResponseEntity.
Implement a user controller in Spring Boot, wiring user, product, and transaction services, and map rest endpoints for register, get user, login, purchase, and get all products with authorization tokens.
Discover how Spring Security enables secure login and protected rest APIs using encrypted authentication headers, user details service, and password encryption. Learn to configure access rules and login/logout paths.
Explore how Spring Security handles basic authentication, authentication and authorization using HTTP filters, authentication managers, providers, and user details service, and customize security with the security config adapter.
Explore the authorization architecture in Spring Security, detailing how interceptors map urls to permissions, and how AccessDecisionManager utilizes role, authenticated, and Jsr voters with AffirmativeBased, ConsensusBased, and unanimousBased strategies.
Define a spring security configuration to customize authentication rules, enable cors, permit public resources and user endpoints, and secure remaining APIs with admin role via basic authentication.
Learn how to install and configure json web tokens for secure authentication, set expiration and refresh, define secret keys in application properties, and send authorization headers with bearer prefix.
Create a custom JWT authorization filter by extending the basic authentication filter, wire it into Spring Security, validate tokens with a token provider, and set the security context.
Practice testing the server side of a React full stack app built with Spring Boot and JWT.
Build the client-side UI for user and product management, consume server data via API calls, and implement login, registration, profiles, and admin user CRUD with authorization.
Explore the React project structure, from package.json and public and src folders to index.js, and learn how React DOM renders a single-page app served by npm start.
Configure external dependencies for the grid project by defining index and bootstrap components, completing the configuration and aligning equity and purpose.
Create model classes on the React client by building a model package under main package, defining user and role classes, plus a cost world class, and outlining a transaction model.
Explore observables in React as asynchronous data streams, with RxJS support, and learn how observers subscribe, and handle next, error, and complete events, including session storage interactions.
Implement a user service that handles login, logout, registration, get products, and purchases via REST APIs, managing current user with a behavior subject and local storage, exposing it as observable.
Create a login component in React by wiring the user service to a login form. Manage state for user and errors, and render the login page with redirect to homepage.
Implement the register component in a React full-stack setup by building a register page, wiring to the user service, and managing form state and events for registration.
Build a React home page that lists products in a bootstrap table, fetches data from the user service, and handles purchases via transactions while managing current user and status messages.
Create a reusable user modal to edit and create users, using a Bootstrap modal and a user model with state for user, loading, and errors, connected to admin services.
Implement a lead model confirmation dialog as a React component using a bootstrap modal, wiring state, props, and services to delete users and handle errors.
Implement not found and unauthorized error components under a components/errors folder, exporting them with render functions and a container, and include a return home page.
Explain building React routers with a class component, selecting a history type (memory history or hash history), and defining routes for login, profile, product detail with parameters, and 404/401 pages.
Protect admin and other routes in React by using a guard wrapper component that renders content based on user roles from the session, redirecting to login or an unauthorized page.
Create a template navigation bar for a React app, import font awesome icons, manage current user and admin state from the user service, and render login, profile, and admin options.
Test the application by starting the server (via main class or Gradle task), launching the Kaline site, and validating different user roles configured in the database.
In this course, we will implement example project step by step with using Spring Boot and React. We will create a product management system. And products can be seen and bought by users.
There will be two roles of users. Admin and User.
So we will also go on with role based authentication. To imlement it, we will use Json Web Token (JWT).
To secure login, authentication and authorization, we will use Spring security.
We will go on with two main components. These are client side and server side.
On client side, we will implement example react project.
- Admin Panel and user operations will be implemented.
On server side, we will implement example spring boot project.
- Model view controller will be implemented.
- Liquibase will be implemented for database changesets.
- Mysql will be used for Database.
- Json Web Token will be used for role based authentication.
Our example project will be product management system. With this project, we will create an application that contains different pages like Login, Register, Home, Admin, Profile etc. And we will manage all pages one by one. Like you see from page list, we will have different role-based pages like Admin, Profile... so we will also see the role based authentication and authorization or for frontend terminology, it is guards.