Learning Spring Boot 2.0 - Second Edition

Packt Publishing
  • 2. Auflage
  • |
  • erschienen am 3. November 2017
  • |
  • 370 Seiten
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-78646-820-8 (ISBN)
Use Spring Boot to build lightning-fast appsAbout This BookGet up to date with the defining characteristics of Spring Boot 2.0 in Spring Framework 5Learn to perform Reactive programming with SpringBootLearn about developer tools, AMQP messaging, WebSockets, security, MongoDB data access, REST, and moreWho This Book Is ForThis book is designed for both novices and experienced Spring developers. It will teach you how to override Spring Boot's opinions and frees you from the need to define complicated configurations.What You Will LearnCreate powerful, production-grade applications and services with minimal fussSupport multiple environments with one artifact, and add production-grade support with featuresFind out how to tweak your apps through different propertiesUse custom metrics to track the number of messages published and consumedEnhance the security model of your appsMake use of reactive programming in Spring BootBuild anything from lightweight unit tests to fully running embedded web container integration testsIn DetailSpring Boot provides a variety of features that address today's business needs along with today's scalable requirements. In this book, you will learn how to leverage powerful databases and Spring Boot's state-of-the-art WebFlux framework. This practical guide will help you get up and running with all the latest features of Spring Boot, especially the new Reactor-based toolkit.The book starts off by helping you build a simple app, then shows you how to bundle and deploy it to the cloud. From here, we take you through reactive programming, showing you how to interact with controllers and templates and handle data access. Once you're done, you can start writing unit tests, slice tests, embedded container tests, and even autoconfiguration tests.We go into detail about developer tools, AMQP messaging, WebSockets, security, and deployment. You will learn how to secure your application using both routes and method-based rules. By the end of the book, you'll have built a social media platform from which to apply the lessons you have learned to any problem. If you want a good understanding of building scalable applications using the core functionality of Spring Boot, this is the book for you.Style and approachThis book takes a tutorial-based approach to teach you all you need to know to get up and running with the latest version of Spring Boot. Filled with examples, you will gain hands-on experience of every area that Spring tackles.
2nd Revised edition
  • Englisch
  • Birmingham
  • |
  • Großbritannien
  • Für Beruf und Forschung
  • Überarbeitete Ausgabe
  • 8,74 MB
978-1-78646-820-8 (9781786468208)
weitere Ausgaben werden ermittelt
Greg L. Turnquist has been a software professional since 1997. In 2002, he joined the senior software team that worked on Harris' $3.5 billion FAA telco program, architecting mission-critical enterprise apps while managing a software team. He provided after-hours support to a nation-wide system and is no stranger to midnight failures and software triages. In 2010, he joined the SpringSource division of VMware, which was spun off into Pivotal in 2013.
As a test-bitten script junky, Java geek, and JavaScript Padawan, he is a member of the Spring Data team and the lead for Spring Session MongoDB. He has made key contributions to Spring Boot, Spring HATEOAS, and Spring Data REST while also serving as editor-at-large for Spring's Getting Started Guides.
Greg wrote technical best sellers Python Testing Cookbook and Learning Spring Boot, First Edition, for Packt. When he isn't slinging code, Greg enters the world of magic and cross swords, having written the speculative fiction action and adventure novel, Darklight.
He completed his master's degree in computer engineering at Auburn University and lives in the United States with his family.
  • Cover
  • Copyright
  • Credits
  • Foreword
  • About the Author
  • About the Reviewer
  • www.PacktPub.com
  • Customer Feedback
  • Table of Contents
  • Preface
  • Chapter 1: Quick Start with Java
  • Getting started
  • Spring Boot starters
  • Running a Spring Boot application
  • Delving into Spring Boot's property support
  • Bundling up the application as a runnable JAR file
  • Deploying to Cloud Foundry
  • Adding production-ready support
  • Pinging our app for general health
  • Metrics
  • Summary
  • Chapter 2: 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
  • Why is Spring doing this?
  • 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
  • Chapter 3: Reactive Data Access with Spring Boot
  • Getting underway with a reactive data store
  • Solving a problem
  • Wiring up Spring Data repositories with Spring Boot
  • Creating a reactive repository
  • Pulling data through a Mono/Flux and chain of operations
  • Creating custom finders
  • Querying by example
  • Querying with MongoOperations
  • Logging reactive operations
  • Summary
  • Chapter 4: Testing with Spring Boot
  • Test dependencies
  • Unit testing
  • Slice-based testing
  • Testing with embedded MongoDB
  • Testing with a real MongoDB database
  • Testing WebFlux controllers
  • Fully embedded Spring Boot app tests
  • Testing your custom Spring Boot autoconfiguration
  • Summary
  • Chapter 5: Developer Tools for Spring Boot Apps
  • Using Spring Boot's DevTools for hot code reloading
  • Using Spring Boot's autoconfiguration report
  • Making local changes and seeing them on the target system
  • Writing a custom health check
  • Adding build data to /application/info
  • Creating custom metrics
  • Working with additional Actuator endpoints
  • Summary
  • Chapter 6: AMQP Messaging with Spring Boot
  • Getting started with RabbitMQ
  • Installing RabbitMQ broker
  • Launching the RabbitMQ broker
  • Adding messaging as a new component to an existing application
  • Creating a message producer/message consumer
  • Displaying comments
  • Producing comments
  • AMQP fundamentals
  • Adding customized metrics to track message flow
  • Peeking at Spring Cloud Stream (with RabbitMQ)
  • Introduction to Spring Cloud
  • Logging with Spring Cloud Stream
  • Summary
  • Chapter 7: 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
  • Chapter 8: WebSockets with Spring Boot
  • Publishing saved comments to a chat service
  • Creating a chat service to handle WebSocket traffic
  • Brokering WebSocket messages
  • Broadcasting saved comments
  • Configuring WebSocket handlers
  • 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
  • Registering users without authentication
  • Linking a user to a session
  • Sending user-to-user messages
  • Checking out the final product
  • JSR 356 versus Spring WebFlux messaging
  • Summary
  • Chapter 9: Securing Your App with Spring Boot
  • Securing a Spring Boot application
  • Using Spring Session
  • Creating a Gateway API
  • Securing the chat microservice
  • Authentication versus authorization
  • Sharing session details with other microservices
  • Securing the images microservice
  • Wiring in image ownership
  • Authorizing methods
  • Tailoring the UI with authorization checks
  • Securing WebSockets
  • Tracing calls
  • Securing the Config Server
  • Securing the Eureka Server
  • Summary
  • Chapter 10: Taking Your App to Production with Spring Boot
  • Profile-based sets of beans
  • Creating configuration property beans
  • Overriding property settings in production
  • @ConfigurationProperties versus @Value
  • Pushing app to Cloud Foundry and adjusting the settings
  • Summary
  • Index

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

36,99 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen