Book description
An end-to-end software development guide for the Java eco-system using the most advanced frameworks: Spring and Spring Boot. Learn the complete workflow by building projects and solving problems.
About This Book- Learn reactive programming by implementing a reactive application with Spring WebFlux
- Create a robust and scalable messaging application with Spring messaging support
- Get up-to-date with the defining characteristics of Spring Boot 2.0 in Spring Framework 5
- Learn about developer tools, AMQP messaging, WebSockets, security, MongoDB data access, REST, and more
- This collection of effective recipes serves as guidelines for Spring Boot application development
Java developers wanting to build production-grade applications using the newest popular Spring tools for a rich end-to-end application development experience.
What You Will Learn- Get to know the Spring Boot and understand how it makes creating robust applications extremely simple
- Understand how Spring Data helps us add persistence in MongoDB and SQL databases
- Implement a websocket to add interactive behaviors in your applications
- Create powerful, production-grade applications and services with minimal fuss
- Use custom metrics to track the number of messages published and consumed
- Build anything from lightweight unit tests to fully running embedded web container integration tests
- Learn effective testing techniques by integrating Cucumber and Spock
- Use Hashicorp Consul and Netflix Eureka for dynamic Service Discovery
Spring Framework has become the most popular framework for Java development. It not only simplifies software development but also improves developer productivity. This book covers effective ways to develop robust applications in Java using Spring.
The course is up made of three modules, each one having a take-away relating to building end-to-end java applications. The first module takes the approach of learning Spring frameworks by building applications.You will learn to build APIs and integrate them with popular fraemworks suh as AngularJS, Spring WebFlux, and Spring Data. You will also learn to build microservices using Spring's support for Kotlin. You will learn about the Reactive paradigm in the Spring architecture using Project Reactor. In the second module, after getting hands-on with Spring, you will learn about the most popular tool in the Spring ecosystem-Spring Boot. You will learn to build applications with Spring Boot, bundle them, and deploy them on the cloud. After learning to build applications with Spring Boot, you will be able to use various tests that are an important part of application development. We also cover the important developer tools such as AMQP messaging, websockets, security, and more. This will give you a good functional understanding of scalable development in the Spring ecosystem with Spring Boot. In the third and final module, you will tackle the most important challenges in Java application development with Spring Boot using practical recipes. Including recipes for testing, deployment, monitoring, and securing your applications. This module will also address the functional and technical requirements for building enterprise applications.
By the end of the course you will be comfortable with using Spring and Spring Boot to develop Java applications and will have mastered the intricacies of production-grade applications.
Style and approachA simple step-by-step guide with practical examples to help you develop and deploy Spring and Spring Boot applications in the real-world.
Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Publisher resources
Table of contents
- Title Page - Courses
- Copyright and Credits - Courses
- Packt Upsell - Courses
- Preface
- Spring 5.0 By Example
- Journey to the Spring World
- Starting in the Spring World – the CMS Application
- Persistence with Spring Data and Reactive Fashion
- Kotlin Basics and Spring Data Redis
-
Reactive Web Clients
- Creating the Twitter Gathering project
- Starting the RabbitMQ server with Docker
- Spring Messaging AMQP
- Enabling Twitter in our application
- Spring reactive web clients
- Changing the Tracked Hashtag Service
- Testing the microservice's integrations
- Spring Actuator
- Summary
- Playing with Server-Sent Events
- Airline Ticket System
- Circuit Breakers and Security
- Putting It All Together
- Learning Spring Boot 2.0
- Quick Start with Java
-
Reactive Web with Spring Boot
- Creating a reactive web application with Spring Initializr
- Learning the tenets of reactive programming
- Introducing Reactor types
- Switching from Embedded Netty to Apache Tomcat
- Comparing reactive Spring WebFlux against classic Spring MVC
- Showing some Mono/Flux-based endpoints
- Creating a reactive ImageService
- Creating a reactive file controller
- Why use reactive programming?
- Interacting with a Thymeleaf template
- Illustrating how going from async to sync can be easy, but the opposite is not
- Summary
- Reactive Data Access with Spring Boot
- Testing with Spring Boot
- Developer Tools for Spring Boot Apps
- AMQP Messaging with Spring Boot
-
Microservices with Spring Boot
- A quick primer on microservices
- Dynamically registering and finding services with Eureka
- Introducing @SpringCloudApplication
- Calling one microservice from another with client-side load balancing
- Implementing microservice circuit breakers
- Monitoring circuits
- Offloading microservice settings to a configuration server
- Summary
-
WebSockets with Spring Boot
- Publishing saved comments to a chat service
- Creating a chat service to handle WebSocket traffic
- Consuming WebSocket messages from the web page
- Moving to a fully asynchronous web client
- Handling AJAX calls on the server
- Introducing user chatting
- Sending user-specific messages
- Checking out the final product
- JSR 356 versus Spring WebFlux messaging
- Summary
-
Securing Your App with Spring Boot
- Securing a Spring Boot application
- Using Spring Session
- Securing the chat microservice
- Sharing session details with other microservices
- Securing the images microservice
- Wiring in image ownership
- Tailoring the UI with authorization checks
- Securing WebSockets
- Tracing calls
- Securing the Config Server
- Securing the Eureka Server
- Summary
- Taking Your App to Production with Spring Boot
- Spring Boot 2.0 Cookbook
- Getting Started with Spring Boot
- Configuring Web Applications
- Web Framework Behavior Tuning
- Writing Custom Spring Boot Starters
- Application Testing
-
Application Packaging and Deployment
- Introduction
- Creating a Spring Boot executable JAR
- Creating Docker images
- Building self-executing binaries
- Spring Boot environment configuration, hierarchy, and precedence
- Adding a custom PropertySource to the environment using EnvironmentPostProcessor
- Externalizing an environmental configuration using property files
- Externalizing an environmental configuration using environment variables
- Externalizing an environmental configuration using Java system properties
- Externalizing an environmental config using JSON
- Setting up Consul
- Externalizing an environmental config using Consul and envconsul
- Health Monitoring and Data Visualization
- Spring Boot DevTools
- Spring Cloud
- Bibliography
Product information
- Title: Developing Java Applications with Spring and Spring Boot
- Author(s):
- Release date: October 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789534757
You might also like
video
Modern Java Web Applications with Spring Boot 2.x
Building web application has been a challenge for many Java developers because of the complexities of …
book
Beginning Spring Boot 2: Applications and Microservices with the Spring Framework
Learn Spring Boot and how to build Java-based enterprise, web, and microservice applications with it. In …
book
Spring REST: Building Java Microservices and Cloud Applications
Design and develop Java-based RESTful APIs using the latest versions of the Spring MVC and Spring …
book
Modern API Development with Spring and Spring Boot
A developer's guide to designing, testing, and securing production-ready modern APIs with the help of practical …