Spring 5 Framework Development


Course Description

"The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments." This course is for Java Programmers who want to understand the Spring Framework and the use of the Java Persistence API (JPA) in an enterprise software development environment. It is suitable for people who have no experience with Spring or programmers who have been working with Spring but might have joined a project that is already configured and not had to create one from scratch. At the end of the course the participants will have a good understanding of Enterprise Software Development, Design Patterns and the core philosophies of the Spring Framework and will have practical experience in creating Spring based web applications for the Enterprise environment.

Duration: 5 days


Pre-requisites

The course assumes a prior knowledge of OOP with Java. Some knowledge of JDBC and JSP is useful but not essential. It assumes NO prior knowledge of dependency injection and inversion of control.

Course Objectives

Understand the core principles of Spring, and of Dependency Injection (DI) / Inversion of Control Use the Spring Core module and DI to configure and wire application objects (beans) together Know the different types of metadata (XML, annotations/@Component, and Java Configuration/@Configuration), and how and when to use them Use Spring Boot and Spring Initializr to simplify project specification, dependency management and configuration Work with the ORM (Object-Relational Mapping) module to integrate Spring with JPA and Hibernate Use Spring Data to automatically generate JPA-based repository classes Integrate Spring with Java EE Web applications Build Web applications with Spring MVC, including configuration using Java config and Servlet 3 capabilities Understand REST, and use Spring MVC to build RESTful services Use AJAX-based front ends with Spring MVC / Spring REST Use Spring Security to implement authentication and authorization for your web application Understand and use the core capabilities of Spring’s Reactive programming support Create a RESTful web service based on the reactive Spring WebFlux model Apply CI/CD techniques for automated Spring Boot application testing and deployment Configure a Virtual Private Server (VPS) to host your web application with own domain and SSL certificate

What is the Spring Framework?

The Inversion of Control Design Pattern Core Design Considerations of the Spring Framework Small and lightweight Inversion of Control Coding to Interfaces not implementations Use of annotated POJOs rather than inheritance Convention over configuration Sensible defaults to minimise configuration Aspect Oriented Programming

Working with POJOs

Annotations Introducing Lombok @GETTER, @SETTER @AllArgsConstruction @NoArgsConstructor @ToString

Spring managed beans

Defining beans in an xml file Defining beans in a config file Defining beans using stereotypes @Component @Service @Repository Loose coupling - Inversion of Control @Autowired

Spring JdbcTemplate

The Spring JdbcTemplate is a good example of the elegance and simplicity of the Spring Framework. It takes the repetitive boilerplate code out of database access and simplifies database access. The DAO Pattern Implementing an DAO using the Spring JdbcTemplate

Jpa - Java Persistence API

What is an ORM? What is Hibernate? How does Hibernate relate to JPA @Entity @Id @Column Extending JPA Repository

Spring Web MVC

The Model View Controller design pattern Creating a @Controller Creating a ViewResolver Creating a View Adding data to the model

Spring Boot

Spring Boot allows us to create a Spring project quickly and easily. It simplifies the creation of the project and the management of dependencies. It has sensible defaults to minimise or sometimes eliminate configuration. It generates a single jar file to simplify deployment even for complex web applications by including an embedded web server Spring Initializr Creating a Spring Boot application Making Spring Boot run from the command line Using logging

Externalising Application Metadata

Application.properties @Value annotation Use of profiles Other configuration file formats, yml, xml Overriding application properties Using a separate application.properties outside the jar Specifying profile from command line

Spring Boot Web Application

Creating a Web Application using Spring Initializr Adding an @Entity to model your data Adding a @Repository Creating a @Controller Adding Thymeleaf views Understanding the Thymeleaf templating language

Spring Boot RESTful API

Create a @RestController Defining @RequestMapping @PathParam @RequestBody Integrating with JPA @GET, @PUT, @POST, @DELETE

Spring Security Deep Dive

Filtering requests Session based authentication vs token based authentication Introduction to JWT Creating a login endpoint that returns a JWT Using JWT to authorize requests

The Streams API

Streaming Lambda functions Programming Java using a functional style List operations Map & Reduce example

Spring WebFlux

The problems with Tomcat - thread pool, single thread per request, blocking calls Understanding asynchronous programming Flux and Mono classes Netty webserver Non blocking database access Creating a RESTful WebFlux api Creating a non-blocking client

Deploying Your Spring Application

Get a VPS Installing the JDK Installing MySQL Getting public ip address Opening Firewall ports Running your application Overriding configuration settings Registering a domain Pointing domain at your server Generating an SSL certificate for you application Configuring your application to use SSL

DevOps

Storing your project in GitHub Adding continuous integration Adding automated testing


Schedule

NameDateLocation 
Spring 5 Framework Development 2024-05-13 Online
Spring 5 Framework Development 2024-10-21 Online

Spring 5 Spring Framework Java Spring Boot Reactive Web Framework AJAX REST MVC DevOps Spring Spring5 OOP Object Oriented Programming