Zum Inhalt

Spring 6 Recipes

A Problem-Solution Approach to Spring Framework

  • 2023
  • Buch
insite
SUCHEN

Über dieses Buch

Diese ausführliche Spring-basierte Java-Entwicklercode-Referenz wurde aktualisiert und löst nun viele Ihrer Spring Framework 6-Probleme anhand wiederverwendbarer, vollständiger und realer Beispiele für funktionierenden Code. Spring 6 Recipes (5th Edition) enthält jetzt Spring Native, das Ihr Java-basiertes Spring Framework für Unternehmen, native Cloud, Webanwendungen und Mikroservices beschleunigt. Es wurde ebenfalls aktualisiert und enthält jetzt Spring R2DBC for Reactive Relational Database Connectivity, eine Spezifikation zur Integration von SQL-Datenbanken wie PostgreSQL, MySQL und mehr unter Verwendung reaktiver Treiber. Darüber hinaus enthält dieses Buch zusätzliche Abdeckungen über WebFlux für reaktivere Spring-Webanwendungen. Durch reaktive Programmierung können Sie Systeme bauen, die widerstandsfähig gegen hohe Belastungen sind, insbesondere in komplexeren, nativen Cloud-Anwendungen im Unternehmen, die Spring Framework ermöglicht. Diese aktualisierte Ausgabe verwendet auch Code-Snippets und Beispiele, die auf dem neuesten verfügbaren Standard-Langzeit-Support-Release von Java basieren. Wenn Sie ein neues Projekt starten, können Sie den Code und die Konfigurationsdateien aus diesem Buch kopieren und dann für Ihre spezifischen Anforderungen an Spring Framework-basierte Anwendungen modifizieren. Dies kann Ihnen eine Menge Arbeit ersparen, wenn Sie ein Projekt von Grund auf neu erstellen. Diese leistungsstarke Code-Referenz ist ein "Muss" für Ihre Print- oder digitale Bibliothek. Dieses Entwickler-Kochbuch wird mit begleitendem Quellcode ausgeliefert, der auf GitHub unter der neuesten Open-Source-Lizenz von Creative Commons frei verfügbar ist. What You 'll LearnHolen Sie sich wiederverwendbare Coderezepte und -schnipsel für Spring, Anmerkungen und andere EntwicklungswerkzeugeDive into Spring Native, die die beliebten Spring und GraalVM für höhere Leistung, Geschwindigkeit und Zuverlässigkeit Ihrer Spring Framework 6 ApplikationenErkunden Sie Spring R2BC für reaktive, relationale Datenbankkonnektivität mit SQLBuild reaktiven Spring MVC-basierten Webanwendungen und Mikroservices, die WebFluxEnhance für Ihr Unternehmen oder native Cloud-Anwendungen mit Spring Transaction ManagementTest verwenden. Sichern und bereitstellen Sie Ihre Spring-Anwendungen mithilfe wiederverwendbarer Codevorlagen zur VerfügungWho This Book Is ForDieses Buch ist für erfahrene Java-Programmierer, Softwareentwickler mit Erfahrung im Spring Framework.

Inhaltsverzeichnis

Frontmatter
Chapter 1. Spring Core Tasks
Abstract
In this chapter, you’ll learn about the core tasks associated with Spring. At the heart of the Spring Framework is the Spring Inversion of Control (IoC) container. The IoC container is used to manage and configure POJOs or Plain Old Java Objects. Because one of the primary appeals of the Spring Framework is to build Java applications with POJOs, many of Spring’s core tasks involve managing and configuring POJOs in the IoC container.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 2. Spring MVC
Abstract
MVC is an important module of the Spring Framework. It builds on the powerful Spring IoC container and makes extensive use of the container features to simplify its configuration.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 3. Spring MVC: REST Services
Abstract
In this chapter, you will learn how Spring addresses Representational State Transfer, usually referred to by its acronym REST. REST has had an important impact on web applications since the term was coined by Roy Fielding in the year 2000.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 4. Spring WebFlux
Abstract
When the Servlet API was initially released, the majority of the implementing containers used a thread per request, which meant a thread was blocked until the request processing had finished and the response was sent to the client. However, in those early days, there weren’t as many devices connected to the Internet as nowadays. Due to the increased number of devices, the number of HTTP requests handled has grown significantly. Due to this increase, for a lot of web applications, keeping a thread blocked isn’t feasible anymore. In the last couple of years, there has been an uprising in reactive programming, and with Spring it is possible to write reactive web applications. To be reactive Spring utilizes Project Reactor as an implementation of the Reactive Streams API. It goes beyond the scope of this book to do a full dive into reactive programming, but in short it is a way of doing non-blocking functional programming.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 5. Spring Security
Abstract
In this chapter, you will learn how to secure applications using the Spring Security framework. Spring Security was initially known as Acegi Security, but its name has been changed since joining with the Spring Portfolio projects. Spring Security can be used to secure any Java application, but it’s mostly used for web-based applications. Web applications, especially those that can be accessed through the Internet, are vulnerable to hacker attacks if they are not secured properly.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 6. Data Access
Abstract
In this chapter, you will learn how Spring can simplify your database access tasks (Spring can also simplify your NoSQL and BigData tasks, which is covered in Chapter 9). Data access is a common requirement for most enterprise applications, which usually require accessing data stored in relational databases. As an essential part of Java SE, Java Database Connectivity (JDBC) defines a set of standard APIs for you to access relational databases in a vendor-independent fashion.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 7. Spring Transaction Management
Abstract
In this chapter, you will learn about the basic concept of transactions and Spring’s capabilities in the area of transaction management. Transaction management is an essential technique in enterprise applications to ensure data integrity and consistency. Spring, as an enterprise application framework, provides an abstract layer on top of different transaction management APIs. As an application developer, you can use Spring’s transaction management facilities without having to know much about the underlying transaction management APIs.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 8. Spring Batch
Abstract
Batch processing has been around for decades. The earliest widespread applications of technology for managing information (information technology) were applications of batch processing. These environments didn’t have interactive sessions and usually didn’t have the capability to load multiple applications in memory. Computers were expensive and bore no resemblance to today’s servers. Typically, machines were multiuser and in use during the day (time-shared). During the evening, however, the machines would sit idle, which was a tremendous waste. Businesses invested in ways to utilize the offline time to do work aggregated through the course of the day. Out of this practice emerged batch processing.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 9. Spring Data Access with NoSQL
Abstract
Most applications use a relational database like Oracle, MySQL, or PostgreSQL; however, there is more to data storage than just SQL databases. There are
Marten Deinum, Daniel Rubio, Josh Long
Chapter 10. Spring Java Enterprise Services and Remoting Technologies
Abstract
In this chapter, you will learn about Spring’s support for the most common Java enterprise services: Java Management Extensions (JMX), sending email with Jakarta Mail, and scheduling tasks with and without Quartz. In addition, you’ll learn about Spring’s support for SOAP web services.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 11. Spring Messaging
Abstract
In this chapter, you will learn about Spring’s support for messaging. Messaging is a very powerful technique for scaling applications. It allows work that would otherwise overwhelm a service to be queued up. It also encourages a decoupled architecture. A component, for example, might only consume messages with a single java.util.Map-based key/value pair. This loose contract makes it a viable hub of communication for multiple, disparate systems.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 12. Spring Integration
Abstract
In this chapter, you will learn the principles behind enterprise application integration (EAI), used by many modern applications to decouple dependencies between components. The Spring Framework provides a powerful and extensible framework called Spring Integration. Spring Integration provides the same level of decoupling for disparate systems and data that the core Spring Framework provides for components within an application. This chapter aims to give you all the required knowledge to understand the patterns involved in EAI, to understand what an enterprise service bus (ESB) is andultimatelyhow to build solutions using Spring Integration. If you’ve used an EAI server or an ESB, you’ll find that Spring Integration is markedly simpler than anything you’re likely to have used before.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 13. Spring Testing
Abstract
In this chapter, you will learn about basic techniques you can use to test Java applications and the testing support features offered by the Spring Framework. These features can make your testing tasks easier and lead you to better application design. In general, applications developed with the Spring Framework and the dependency injection pattern are easy to test.
Marten Deinum, Daniel Rubio, Josh Long
Chapter 14. Caching
Abstract
When a heavy computation is done in a program, retrieval of data is slow, or the retrieved data hardly ever changes. It can be useful to apply caching. Caching is the ability to store and retrieve data, transparently, so that data can be served quicker to the client.
Marten Deinum, Daniel Rubio, Josh Long
Backmatter
Titel
Spring 6 Recipes
Verfasst von
Marten Deinum
Daniel Rubio
Josh Long
Copyright-Jahr
2023
Verlag
Apress
Electronic ISBN
978-1-4842-8649-4
Print ISBN
978-1-4842-8648-7
DOI
https://doi.org/10.1007/978-1-4842-8649-4

Die PDF-Dateien dieses Buches entsprechen nicht vollständig den PDF/UA-Standards, bieten jedoch eingeschränkte Bildschirmleseunterstützung, beschriebene nicht-textuelle Inhalte (Bilder, Grafiken), Lesezeichen zur einfachen Navigation sowie durchsuchbaren und auswählbaren Text. Nutzer von unterstützenden Technologien können Schwierigkeiten bei der Navigation oder Interpretation der Inhalte in diesem Dokument haben. Wir sind uns der Bedeutung von Barrierefreiheit bewusst und freuen uns über Anfragen zur Barrierefreiheit unserer Produkte. Bei Fragen oder Bedarf an Barrierefreiheit kontaktieren Sie uns bitte unter accessibilitysupport@springernature.com

    Bildnachweise
    AvePoint Deutschland GmbH/© AvePoint Deutschland GmbH, NTT Data/© NTT Data, Wildix/© Wildix, arvato Systems GmbH/© arvato Systems GmbH, Ninox Software GmbH/© Ninox Software GmbH, Nagarro GmbH/© Nagarro GmbH, GWS mbH/© GWS mbH, CELONIS Labs GmbH, USU GmbH/© USU GmbH, G Data CyberDefense/© G Data CyberDefense, FAST LTA/© FAST LTA, Vendosoft/© Vendosoft, Kumavision/© Kumavision, Noriis Network AG/© Noriis Network AG, WSW Software GmbH/© WSW Software GmbH, tts GmbH/© tts GmbH, Asseco Solutions AG/© Asseco Solutions AG, AFB Gemeinnützige GmbH/© AFB Gemeinnützige GmbH