Mastering Microservices with Spring Boot and Spring Cloud Training

Mastering Microservices with Spring Boot and Spring Cloud Training Courseware (WA2607)

Cloud-based, highly-distributed applications face additional challenges in supporting a dynamic environment – especially around configuration, service discovery, service resilience and monitoring.  Spring Cloud embraces and extends the popular suite of open source cloud tools published by Netflix (Eureka, Hystrix, Ribbon, etc).

This course introduces Spring Boot, Spring Cloud and the Netflix OSS suite as a way of deploying highly resilient and scalable RESTful services and web applications.

Benefits

In this training, attendees will learn how to:

  • Create Spring Boot projects
  • Use databases and JPA in Spring Boot
  • Create RESTful services with Spring Boot
  • Deploy services that use Netflix Eureka, Hystrix and Ribbon to create resilient and scalable services

Outline

  1. Introduction to the Spring Framework
    1. What is the Spring Framework?
    2. Spring Philosophies
    3. Why Spring?
    4. Spring Modules
    5. Requirements and Supported Environments
    6. Using Spring with Servers
    7. Role of Spring Container
    8. Spring Example
    9. Avoiding Dependency on Spring
    10. Additional Spring Projects/Frameworks
  2. Spring Annotation Configuration
    1. Spring Containers
    2. Annotation-based Spring Bean Definition
    3. Scanning for Annotation Components
    4. Defining Component Scope Using Annotations
    5. JSR-330 @Named Annotation
    6. JSR-330 @Scope
    7. Annotation-based Dependency Injection
    8. Wiring Bean using @Inject
    9. @Autowired – Constructor-based
    10. @Autowired – Setter-based (on Field)
    11. @Autowired - Setter-based (on method)
    12. @Autowired – Collection
    13. @Autowired – Maps
    14. @Autowired & @Qualifier with Constructors, Fields, and Methods
    15. @Autowired & Custom Qualifiers
    16. @Autowired & Simple Custom Qualifier Field
    17. @Autowired & Simple Custom Qualifier Method
    18. Dependency Injection Validation
    19. @Resource
    20. @PostConstruct and @PreDestroy
  3. Spring Framework Configuration
    1. Java @Configuration Classes
    2. Defining @Configuration Classes
    3. Loading @Configuration Classes
    4. Modularizing @Configuration Classes
    5. Qualifying @Bean Methods
    6. Trouble with Prototype Scope
    7. Trouble with Prototype Scope
    8. Configuration with Spring Expression Language
    9. Resolving Text Messages
    10. Spring Property Conversion
    11. Spring Converter Interface
    12. Using Custom Converters
    13. Spring PropertyEditors
    14. Registering Custom PropertyEditors
  4. Introduction to Spring Boot
    1. What is Spring Boot?
    2. Spring Framework
    3. How is Spring Boot Related to Spring Framework?
    4. Spring Boot 2
    5. Spring Boot Main Features
    6. Spring Boot on the PaaS
    7. Understanding Java Annotations
    8. Spring MVC Annotations
    9. Example of Spring MVC-based RESTful Web Service
    10. Spring Booting Your RESTful Web Service
    11. Spring Boot Skeletal Application Example
    12. Converting a Spring Boot Application to a WAR File
    13. Externalized Configuration
    14. Starters
    15. Maven - The 'pom.xml' File
    16. Spring Boot Maven Plugin
    17. Gradle - The 'build.gradle' File
    18. Spring Boot Gradle Plugin
    19. HOWTO: Create a Spring Boot Application
    20. Spring Initializr
  5. Spring Web MVC
    1. Spring Web MVC
    2. Spring Web Modules
    3. Spring Web MVC Components
    4. DispatcherServlet
    5. Spring WebFlux Module
    6. Spring WebFlux
    7. Template Engines
    8. Spring Boot MVC Example
    9. Spring Web MVC Mapping of Requests
    10. Advanced @RequestMapping
    11. Composed Request Mappings
    12. Spring Web MVC Annotation Controllers
    13. Controller Handler Method Parameters
    14. Controller Handler Method Return Types
    15. View Resolution
    16. Spring Boot Considerations
  6. Overview of Spring Boot Database Integration
    1. DAO Support in Spring
    2. Spring Data Access Modules
    3. Spring JDBC Module
    4. Spring ORM Module
    5. DataAccessException
    6. @Repository Annotation
    7. Using DataSources
    8. DAO Templates
    9. DAO Templates and Callbacks
    10. ORM Tool Support in Spring
  7. Using Spring with JPA
    1. Spring JPA
    2. Benefits of Using Spring with ORM
    3. Spring @Repository
    4. Using JPA with Spring
    5. Configure Spring Boot JPA EntityManagerFactory
    6. Application JPA Code
    7. Spring Boot Considerations
    8. Spring Data JPA Repositories
    9. Database Schema Migration
    10. Database Schema Migration for CI/CD using Liquibase
    11. How Liquibase Works?
    12. Changelogs in Liquibase
    13. Preconditions in Changelogs
    14. Sample Empty Changelog
    15. Sample Precondition in Changelog
    16. Sample Changeset in Changelog
    17. Running Liquibase
    18. Liquibase Commands
  8. Introduction to MongoDB
    1. MongoDB
    2. MongoDB Features
    3. MongoDB on the Web
    4. Positioning of MongoDB
    5. MongoDB Applications
    6. MongoDB Data Model
    7. MongoDB Limitations
    8. MongoDB Use Cases
    9. MongoDB Query Language (QL)
    10. The CRUD Operations
    11. The find Method
    12. The findOne Method
    13. A MongoDB Query Language (QL) Example
    14. Inserts
    15. MongoDB vs Apache CouchDB
  9. Working with Data in MongoDB
    1. Reading Data in MongoDB
    2. The Query Interface
    3. Query Syntax is Driver-Specific
    4. Projections
    5. Query and Projection Operators
    6. MongoDB Query to SQL Select Comparison
    7. Cursors
    8. Cursor Expiration
    9. Writing Data in MongoDB
    10. An Insert Operation Example
    11. The Update Operation
    12. An Update Operation Example
    13. A Remove Operation Example
    14. Limiting Return Data
    15. Data Sorting
    16. Aggregating Data
    17. Aggregation Stages
    18. Accumulators
    19. An Example of an Aggregation Pipe-line
    20. Map-Reduce
  10. Spring Data with MongoDB
    1. Why MongoDB?
    2. MongoDB in Spring Boot
    3. Pom.xml
    4. Application Properties
    5. MongoRepository
    6. Custom Query Methods
    7. Supported Query Keywords
    8. Complex Queries
    9. Create JavaBean for Data Type
    10. Using the Repository
  11. Spring REST Services
    1. Many Flavors of Services
    2. Understanding REST
    3. RESTful Services
    4. REST Resource Examples
    5. @RestController Annotation
    6. Implementing JAX-RS Services and Spring
    7. JAX-RS Annotations
    8. Java Clients Using RestTemplate
    9. RestTemplate Methods
  12. Spring Security
    1. Securing Web Applications with Spring Boot 2
    2. Spring Security
    3. Authentication and Authorization
    4. Programmatic vs Declarative Security
    5. Adding Spring Security to a Project
    6. Spring Security Configuration
    7. Spring Security Configuration Example
    8. Authentication Manager
    9. Using Database User Authentication
    10. LDAP Authentication
    11. What is Security Assertion Markup Language (SAML)?
    12. What is a SAML Provider?
    13. Spring SAML2 Web SSO Authentication
    14. Setting Up an SSO Provider
    15. Adding SAML Dependencies to a Project
    16. SAML vs. OAuth2
    17. OAuth2 Overview
    18. OAuth – Facebook Sample Flow
    19. OAuth Versions
    20. OAuth2 Components
    21. OAuth2 – End Points
    22. OAuth2 – Tokens
    23. OAuth – Grants
    24. Authenticating Against an OAuth2 API
    25. OAuth2 using Spring Boot – Dependencies
    26. OAuth2 using Spring Boot – application.yml
    27. OAuth2 using Spring Boot – Main Class
    28. OAuth2 using Spring Boot – Single Page Application Client
    29. JSON Web Tokens
    30. JSON Web Token Architecture
    31. How JWT Works
    32. JWT Header
    33. JWT Payload
    34. JWT Example Payload
    35. JWT Example Signature
    36. How JWT Tokens are Used
    37. Adding JWT to HTTP Header
    38. How The Server Makes Use of JWT Tokens
    39. What are “Scopes”?
    40. JWT with Spring Boot – Dependencies
    41. JWT with Spring Boot – Main Class
  13. Spring JMS
    1. Spring JMS
    2. JmsTemplate
    3. Connection and Destination
    4. JmsTemplate Configuration
    5. Transaction Management
    6. Example Transaction Configuration
    7. Producer Example
    8. Consumer Example
    9. Converting Messages
    10. Message Listener Containers
    11. Message-Driven POJO's Async Receiver Example
    12. Message-Driven POJO's Async Receiver Configuration
    13. Spring Boot Considerations
  14. Microservices
    1. What is a "Microservice"?
    2. One Helpful Analogy
    3. SOA - Microservices Relationship
    4. ESB - Microservices Relationship
    5. Traditional Monolithic Designs and Their Role
    6. Disadvantages of Monoliths
    7. Moving from a Legacy Monolith
    8. When Moving from a Legacy Monolith
    9. The Driving Forces Behind Microservices
    10. How Can Microservices Help You?
    11. The Microservices Architecture
    12. Utility Microservices at AWS
    13. Microservices Inter-connectivity
    14. The Data Exchange Interoperability Consideration
    15. Managing Microservices
    16. Implementing Microservices
    17. Embedding Databases in Java
    18. Microservice-Oriented Application Frameworks and Platforms
  15. Spring Cloud Config
    1. The Spring Cloud Configuration Server
    2. Why Configuration Management is Important
    3. Configuration Management Challenges in Microservices
    4. Separation of Configuration from Code
    5. Configuration Service
    6. How the Configuration Service Works
    7. Cloud Config Server Properties File
    8. Git Integration
    9. Properties
    10. Configuration Client
    11. Sample Client Config File
    12. Sample Client Application
    13. Dynamic Property Updates – Server
    14. Dynamic Property Update – Client
    15. Dynamic Property Update – Execute
  16. Service Discovery with Netflix Eureka
    1. Service Discovery in Microservices
    2. Load Balancing in Microservices
    3. Netflix Eureka
    4. Eureka Architecture
    5. Communications in Eureka
    6. Time Lag
    7. Eureka Deployment
    8. Peer Communication Failure between Servers
    9. Eureka Server Configuration
    10. Eureka Client/Service
    11. Eureka Client Properties
    12. Spring Cloud DiscoveryClient Interface
    13. ServiceInstance JSON
    14. ServiceInstance Interface
    15. What about Services
    16. Eureka and the AWS Ecosystem
  17. Load-Balancing with Netflix Ribbon
    1. Load Balancing in Microservices
    2. Netflix Ribbon
    3. Server-side Load Balance
    4. Client-side Load Balance
    5. Architecture
    6. Load Balance Rules
    7. RoundRobinRule
    8. AvailabilityFilteringRule
    9. WeightedResponseTimeRule
    10. RandomRule
    11. ZoneAvoidanceRule
    12. IPing Interface (Failover)
    13. Using Ribbon
    14. YAML Configuration
    15. Configuration Class
    16. Client Class
    17. Client Class Implementation
    18. Integration with Eureka (Service Discovery)
    19. Using Ribbon in the Amazon AWS Cloud
  18. Application Hardening with Netflix Hystrix
    1. Netflix Hystrix
    2. Design Principles
    3. Cascading Failures
    4. Bulkhead Pattern
    5. Circuit Breaker Pattern
    6. Thread Pooling
    7. Request Caching
    8. Request Collapsing
    9. Fail-Fast
    10. Fallback
    11. Using Hystrix
    12. Circuit Breaker Configuration
    13. Fallback Configuration
    14. Collapser Configuration
    15. Rest Controller and Handler
    16. Collapser Service (Part 1)
    17. How the Collapser Works
    18. Hystrix Monitor
    19. Enable Monitoring
    20. Turbine
    21. The Monitor
    22. Monitor details
  19. Edge Components with Netflix Zuul
    1. Zuul is the Gatekeeper
    2. Request Handling
    3. Filters
    4. Filter Architecture
    5. Filter Properties
    6. filterType()
    7. filterOrder()
    8. shouldFilter()
    9. Run()
    10. Cancel Request
    11. Dynamic Filter Loading
    12. Filter Communications
    13. Routing with Eureka and Ribbon
  20. Distributed Tracing with Zipkin
    1. Zipkin
    2. Zipkin Features
    3. Architecture
    4. The Collector
    5. Storage
    6. API
    7. GUI Console
    8. Zipkin Console Homepage
    9. View a Trace
    10. Trace Details
    11. Dependencies
    12. Dependency Details
    13. Zipkin in Spring Boot
    14. Zipkin Configuration

Required Prerequisites

Students should have experience with Java development.