Skip to content

Mat-P1/Spring

Repository files navigation

Spring Boot, Spring & Hibernate

Spring Core, Spring REST, Spring MVC, Spring Security, Thymeleaf, JPA, Hibernate and MySQL.

Key Spring Boot features: Core, Annotations, Java Config, Spring REST, Spring MVC, AOP, Hibernate/JPA, Postman and Maven.

Table of Contents

1. Spring Boot Quick Start

  1. Spring Boot

    • Spring Boot basic concepts
    • Spring Boot Initializr
    • REST API Controller
    • Spring Boot Project Structure
    • Spring Boot Starters
    • Inherit Defaults with Spring Boot Starter Parents
    • Spring Boot Dev Tools
    • Spring Boot Actuator Endpoints
    • Secure Spring Boot Actuator Endpoints
    • Run Spring Boot apps from the Command-Line
    • Use the Spring Boot Maven Plugin to package and run Spring Boot apps
    • Inject custom application properties into a Spring Boot REST Controller
  2. Maven

    • Simplify your build process with Maven
    • Create Maven POM files and add dependencies
    • Run Maven builds from the IDE
    • Use Maven during the development of Real-Time Projects for Spring Boot MVC, Spring Boot Security, Spring Boot REST API and Hibernate/JPA

2. Spring Core

  • Inversion of Control
  • Dependency Injection (Constructor Injection, Setter Injection, Field Injection)
  • Qualifier and Primary annotations
  • Component Scanning
  • Lazy Initialization
  • Bean Scopes
  • Bean lifecycle methods
  • Configure Beans with Java Code

3. Hibernate/JPA CRUD

  • Hibernate basic concepts
  • JPA basic concepts
  • JDBC
  • SQL and MySQL
  • JPA Annotations
  • Simple CRUD Application with Data Access Object (DAO) pattern
  • JPA Query Language (JPQL)
  • Auto generating databases with Hibernate/JPA

4. REST CRUD APIs

  • REST basic concepts
  • JSON
  • REST HTTP
  • Postman
  • JSON Data Binding (To Java POJO)
  • Jackson Project
  • Path Variables
  • Exception Handling
  • Service Layer
  • CRUD application (employee-crud) with Hibernate/JPA, DevTools, MySQL, REST APIs, Data Access Object (DAO) pattern and Service layers
  • Spring Data JPA
  • Updated employee-crud (employee-crud -> employee-crud-updated) with Spring Data JPA and Spring Data REST

5. REST API Security

  • REST API Security Overview
  • Securing APIs with Spring Security
  • Users, roles and passwords
  • Database connection for users, roles and passwords
  • Password encryption with BCrypt

6. Spring MVC

  • Spring MVC with Thymeleaf overview
  • CSS and Thymeleaf
  • Reading forms
  • Adding Data to Spring MVC
  • Working with Spring MVC and HTML tags
  • Validations
  • Regular Expressions (Regex)
  • Custom validations

7. Spring MVC CRUD

  • CRUD application using Spring MVC, Thymeleaf, MySQL, Hibernate/JPA, DevTools, Bootstrap, Data Access Object (DAO) pattern and Service layers

8. Spring MVC Security

  • Overview of Spring Security features for Spring MVC
  • Users, roles and passwords
  • Login and Logout
  • Blocking and displaying content based on roles
  • Database connection for users, roles and passwords
  • Custom Tables for users, roles and passwords
  • Password encryption with BCrypt

9. JPA/Hibernate Advanced Mappings

  • One-to-One
  • One-to-Many
  • Many-to-Many
  • Cascading
  • Eager and Lazy loading
  • Join Fetch
  • Join Table
  • Unidirectional and Bidirectional references
  • Entity Lifecycle

10. AOP: Aspect-Oriented Programming

  • AOP basic concepts, terminology and use cases
  • Advantages and Disadvantages
  • Advice Types (Before advice, AfterReturning advice, AfterThrowing advice, After advice, Around advice)
  • Pointcut expressions
  • Pointcut declaration
  • Ordering advices
  • JoinPoints
  • Post-processing data
  • Pre-processing data
  • Exception Handling
  • Applying AOP in a CRUD APP