Course Duration: 5 Days
Prerequisites:

Java programming knowledge and experience. The class is extremely “hands on” and covers a variety of approaches and techniques for the development of Spring Boot Applications and Microservices. Exposure to Web programming in some form would be beneficial.

Course Objectives:
  • Overview of Spring Core (focus on Java @Configuration)
  • Use Spring Boot starters to create new applications
  • Understand and use Spring Boot’s auto-configuration
  • Customize the configurations of services
  • Understand and use Spring Boot’s Web capabilities (focusing on Spring REST), including embedded servlet containers
  • Use Spring Data /Spring Data JPA capabilities
  • Be familiar with Spring Boot Data REST across JPA Entity Relationships, Projections and Excerpts
  • Use Spring Security with Spring Boot
  • Understand and use Spring Boot’s Actuator and monitor services
  • Understand Spring cloud services such a Zuul edge services and Hystrix callback methods
  • Test Services via MockMvcBuilders and @SpringBootTest
  • Overview of Spring Core (focus on Java @Configuration)
  • Use Spring Boot starters to create new applications
  • Understand and use Spring Boot’s auto-configuration
  • Customize the configurations of services
  • Understand and use Spring Boot’s Web capabilities (focusing on Spring REST), including embedded servlet containers
  • Use Spring Data /Spring Data JPA capabilities
  • Be familiar with Spring Boot Data REST across JPA Entity Relationships, Projections and Excerpts
  • Use Spring Security with Spring Boot
  • Understand and use Spring Boot’s Actuator and monitor services
  • Understand Spring cloud services such a Zuul edge services and Hystrix callback methods
  • Test Services via MockMvcBuilders and @SpringBootTest
Course Outline:

Spring Core XML Configuration

  • Setter Injection, introduce basics here
  • Constructor Injection

Annotation Configuration

  • Spring, @Autowired, @Qualifier, @Value
  • JSR250, @Resource, @PostConstruct, @PreDestroy
  • JSR330, @Inject, @Named, @Singleton
  • JUnit and Spring

Java Configuration

  • @Configuration and @Bean
  • @ComponentScan, includeFilters and excludeFilters
  • PropertySourcesPlaceholderConfigurer and Expression Language (EL)
  • Spring Expression Language (SPEL)
  • JUnit

Spring Boot Basics

  • Spring Starter Projects
  • @SpringBootApplication and auto configuration
  • Using application.properties and application.yaml
  • Changing server port and context root
  • Using Spring Environment object and @Value
  • Logging
    • Commons Logging, Logback
    • Log4j2

Spring Boot Externalize Configuration

  • @Value versus @ConfigurationProperties
  • Relaxed Binding
  • JSR 303 Validation
  • Initializers and Command Line Runners
  • Dynamic Active Profile Selection
  • Controllers and ViewResolvers

Contollers and RestControllers

  • Creating Services, @GetMapping, @PostMapping, @RequestMapping, @ResponseBody, @RequestBody
  • @RequestParam with Optional
  • @PathVariable and URI Templates
  • ResponseEntity
  • Headers and status codes

RestControllers and Content Negotiation

  • Produces and consumes
  • Suffix Negotiation
  • Request parameter negotiation
  • Accept header negotiation
  • Deploying a service as a WAR

RestTemplate Clients

  • Using getForObject, getForEntity, exchange
  • Posting data to services
  • HttpEntity
  • HttpHeaders
  • WebClient
    • Building a ResponseSpec for Get and Post requests
    • WebFlux and using Mono in our tests
    • Content Negotiation with ResponseSpec
    • Subscribing to the Mono of the Response
    • Using retrieve and exchange

Spring Boot Actuators

  • Health and Info Endpoints
  • Customizations in exposure
  • Custom metrics using Micrometer
  • @Endpoint custom actuators, @ReadOperation, @WriteOperation
  • EventListeners
  • Monitoring Services through Prometheus

Persistence Frameworks

  • JPA, EntityManagers, Entity Classes, Annotation mappings
  • Spring JPA Data, CrudRepository, PagingAndSortingRepository
  • Spring Data REST
  • @Projections and Excerpts
  • @OneToMany relationships
  • HAL Browser

Spring Security

  • Spring Security Overview
  • Authentication and Authorization
  • @EnableGlobalMethodSecurity
  • JdbcUserDetailsConfigurerManager and UserDetailsServices
  • HTTPS

Testing RestControllers

  • MockMvcBuilders
  • MockMvc and Mocking Requests
  • @WebMvcTest
  • Integration Testing with @SpringBootTest
    • Mocking Dependencies

Spring Core XML Configuration

  • Setter Injection, introduce basics here
  • Constructor Injection

Annotation Configuration

  • Spring, @Autowired, @Qualifier, @Value
  • JSR250, @Resource, @PostConstruct, @PreDestroy
  • JSR330, @Inject, @Named, @Singleton
  • JUnit and Spring

Java Configuration

  • @Configuration and @Bean
  • @ComponentScan, includeFilters and excludeFilters
  • PropertySourcesPlaceholderConfigurer and Expression Language (EL)
  • Spring Expression Language (SPEL)
  • JUnit

Spring Boot Basics

  • Spring Starter Projects
  • @SpringBootApplication and auto configuration
  • Using application.properties and application.yaml
  • Changing server port and context root
  • Using Spring Environment object and @Value
  • Logging
    • Commons Logging, Logback
    • Log4j2

Spring Boot Externalize Configuration

  • @Value versus @ConfigurationProperties
  • Relaxed Binding
  • JSR 303 Validation
  • Initializers and Command Line Runners
  • Dynamic Active Profile Selection
  • Controllers and ViewResolvers

Contollers and RestControllers

  • Creating Services, @GetMapping, @PostMapping, @RequestMapping, @ResponseBody, @RequestBody
  • @RequestParam with Optional
  • @PathVariable and URI Templates
  • ResponseEntity
  • Headers and status codes

RestControllers and Content Negotiation

  • Produces and consumes
  • Suffix Negotiation
  • Request parameter negotiation
  • Accept header negotiation
  • Deploying a service as a WAR

RestTemplate Clients

  • Using getForObject, getForEntity, exchange
  • Posting data to services
  • HttpEntity
  • HttpHeaders
  • WebClient
    • Building a ResponseSpec for Get and Post requests
    • WebFlux and using Mono in our tests
    • Content Negotiation with ResponseSpec
    • Subscribing to the Mono of the Response
    • Using retrieve and exchange

Spring Boot Actuators

  • Health and Info Endpoints
  • Customizations in exposure
  • Custom metrics using Micrometer
  • @Endpoint custom actuators, @ReadOperation, @WriteOperation
  • EventListeners
  • Monitoring Services through Prometheus

Persistence Frameworks

  • JPA, EntityManagers, Entity Classes, Annotation mappings
  • Spring JPA Data, CrudRepository, PagingAndSortingRepository
  • Spring Data REST
  • @Projections and Excerpts
  • @OneToMany relationships
  • HAL Browser

Spring Security

  • Spring Security Overview
  • Authentication and Authorization
  • @EnableGlobalMethodSecurity
  • JdbcUserDetailsConfigurerManager and UserDetailsServices
  • HTTPS

Testing RestControllers

  • MockMvcBuilders
  • MockMvc and Mocking Requests
  • @WebMvcTest
  • Integration Testing with @SpringBootTest
    • Mocking Dependencies