Spring Boot 3 Recipes: A Problem-Solution Approach for Java Microservices and Cloud-Native Applications
معرفی کتاب «Spring Boot 3 Recipes: A Problem-Solution Approach for Java Microservices and Cloud-Native Applications» نوشتهٔ MARTEN. DEINUM، منتشرشده توسط نشر Apress Media LLC در سال 2024. این کتاب در 672 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Spring Boot 3 Recipes: A Problem-Solution Approach for Java Microservices and Cloud-Native Applications» در دستهٔ برنامهنویسی قرار دارد.
Solve all your Spring Boot 3 micro-framework problems using complete, real-world Java-based code snippets and examples inspired by various problems and corresponding solutions to those problems . When you start a new project, you’ll be able to copy the code and configuration files from this book, and then modify them for your own specific software programming needs. This can save you a great deal of work over creating a project from scratch. Spring Boot 3 Recipes has been revised to include new features like the new Spring Native, newly repackaged Spring Data, Spring Kafka for messaging and more on Kubernetes/deployment than in the previous edition. It includes Java 17 long term support code and Jakarta EE 9+ code as a base for Spring Boot 3. This handy code reference takes advantage of these things as it introduces you to VMWare's Spring Boot 3 and Spring Native. Quickly, it dives into code snippets on how to apply and integrate SpringBoot 3 with the Spring MVC web framework, web sockets and WebFlux for the rapid development of web applications, web services, microservices and more. You'll also get solutions to common problems with data persistence, integrating Spring Boot with batch processing, algorithmic programming via Spring Batch, and much more. These enable you to enhance or round out your web applications or microservices with a data and/or transaction-tier to boot. Other recipes cover topics such as using and integrating Boot with Spring's enterprise services, Spring Integration, testing, monitoring and more. At the end of the book, you'll have the code snippets and packages to deploy your Spring Boot-created microservices or applications on a cloud platform like Amazon using the popular Kubernetes container. Finally, this code reference is a must have for your Spring library. What You'll Learn Get reusable code recipes and snippets for the Spring Boot 3 micro-framework Discover how Spring Boot 3 integrates with other Spring APIs, tools, and frameworks Access Spring MVC, web sockets and WebFlux for easier web development Work with microservices for web services development and integration with your Spring Boot applications Add persistence and a data tier seamlessly to make your Spring Boot web application do more Integrate enterprise services via Spring Integration and Jakarta EE to create a more complex Java application using Spring Boot Who This Book Is For This book is for experienced Java and Spring software programmers, developers. Table of Contents About the Author Introduction Chapter 1: Introduction to Spring Boot 1-1. Create a Spring Boot Application Using Maven Problem Solution How It Works Create the pom.xml File Create the Application Class 1-2. Create a Spring Boot Application Using Gradle Problem Solution How It Works Create the build.gradle File Create the Application Class 1-3. Create a Spring Boot Application Using Spring Initializr Problem Solution How It Works Building the JAR File Summary Chapter 2: The Basics of Spring Boot 2-1. Configure a Bean Problem Solution How It Works Configure a Bean Using @Component Configure a Bean Using an @Bean Method 2-2. Externalize Properties Problem Solution How It Works Override Properties Using an External application.properties File Override Properties Using Profiles Override Properties Using Command-Line Arguments Load Properties from Different Configuration Files 2-3. Configure Testing Problem Solution How It Works Write a Unit Test Mock Dependencies in a Unit Test Perform Integration Testing with Spring Boot Perform Integration Testing with Spring Boot and Mocks Perform Integration Testing with Spring Boot Using Slices Use Testcontainers with Spring Boot Testing 2-4. Configure Logging Problem Solution How It Works Configure Logging Log to a File Use Your Preferred Logging Provider 2-5. Reuse an Existing Configuration Problem Solution How It Works Reuse an Existing XML Configuration Reuse an Existing Java Configuration 2-6. Use Docker with Spring Boot During Development Problem Solution How It Works Spring Boot Docker Compose Support Spring Boot Docker Compose Support: Custom Container Images Spring Boot Testcontainers Support 2-7. Use Spring Boot Devtools to Speed Up Development Problem Solution How It Works Summary Chapter 3: Spring MVC 3-1. Get Started with Spring MVC Problem Solution How It Works Test the Controller 3-2. Expose REST Resources with Spring MVC Problem Solution How It Works Test an @RestController 3-3. Use Thymeleaf with Spring Boot Problem Solution How It Works Add an Index Page Add a Controller and View Add a Details Page Test an @Controller 3-4. Handle Exceptions with Spring MVC Problem Solution How It Works Handle Exceptions for View Technologies Add Attributes to the Model Handle Exceptions for REST Controllers Enable and Use Problem Details 3-5. Implement Internationalization (I18N) Problem Solution How It Works 3-6. Change User Locales Problem Solution How It Works Resolve Locales with an HTTP Request Header Resolve Locales with a Session Attribute Resolve Locales with a Cookie Change a User’s Locale 3-7. Select and Configure the Embedded Server Problem Solution How It Works Set General Configuration Properties Change the Runtime Container 3-8. Configure SSL for the Servlet Container Problem Solution How It Works Create a Self-Signed Certificate Configure Spring Boot to Use the Keystore Support Both HTTP and HTTPS Redirect HTTP to HTTPS 3-9. Implement Asynchronous Request Handling with Controllers and TaskExecutor Problem Solution How It Works Configure Async Processing Write an Asynchronous Controller Use a Callable Use a CompletableFuture Test Async Controllers 3-10. Create Response Writers Problem Solution How It Works Send Multiple Results in a Response Send Multiple Results as Events Test Server-Sent Events 3-11. Consume REST Resources with Spring MVC Problem Solution How It Works Use a RestTemplate Use a RestClient Use a Declarative Client Test RestTemplate or RestClient-Based Code Chapter 4: WebFlux 4-1. Develop a Reactive Application with Spring WebFlux Problem Solution How It Works Set Up a Spring WebFlux Application Create Spring WebFlux Controllers Do Unit Testing for Reactive Controllers Do Integration Testing for Reactive Controllers 4-2. Publish and Consume with Reactive REST Services Problem Solution How It Works Stream JSON Write an Integration Test 4-3. Use Thymeleaf as a Template Engine Problem Solution How It Works Use Thymeleaf Views Make It More Reactive 4-4. Handle Exceptions with Spring WebFlux Problem Solution How It Works Handle Exceptions Handle Exceptions for REST Controllers Enable and Use Problem Details 4-5. Implement Internationalization (I18N) Problem Solution How It Works 4-6. Change User Locales Problem Solution How It Works Resolve Locales with an HTTP Request Header Use a Fixed Locale for Your Application Change a User’s Locale 4-7. Select and Configure the Embedded Server Problem Solution How It Works Set General Configuration Properties Change the Runtime Container 4-8. Configure SSL for the Reactive Container Problem Solution How It Works Create a Self-Signed Certificate Configure Spring Boot to Use the Keystore 4-9. Perform Synchronous Request Handling with Controllers and TaskExecutor Problem Solution How It Works 4-10. Create Response Writers Problem Solution How It Works Send Multiple Results in a Response Specify What to Send with Server Send Events 4-11. Consume REST Resources with Spring WebFlux Problem Solution How It Works Use a WebClient Use a Declarative Client Untitled Chapter 5: Spring Security 5-1. Enable Security in Your Spring Boot Application Problem Solution How It Works Test the Security Perform Integration Testing for Security 5-2. Log In to Web Applications Problem Solution How It Works HTTP Basic Authentication Form-Based Login The Logout Service Anonymous Login Remember-Me Support 5-3. Authenticate Users Problem Solution How It Works Authenticate Users with In-Memory Definitions Authenticate Users Against a Database Authenticate Using OAuth2 Encrypt Passwords 5-4. Make Access Control Decisions Problem Solution How It Works Use an Expression to Make Access Control Decisions Using Spring Beans Secure Methods with Annotations and Expressions 5-5. Add Security to a WebFlux Application Problem Solution How It Works Secure URL Access Log in to WebFlux Applications Authenticate Users Make Access Control Decisions Summary Untitled Chapter 6: Data Access 6-1. Configure a Data Source Problem Solution How It Works Use an Embedded Data Source Use an External Database Obtain a Data Source from JNDI Configure the Connection Pool 6-2. Manage the Database Schema with Spring Boot Problem Solution How It Works Initialize the Database with Flyway 6-3. Use JdbcTemplate or JdbcClient Problem Solution How It Works Access JDBC Through JdbcClient 6-4. Use Spring Data JDBC Problem Solution How It Works 6-5. Test JDBC Code Problem Solution How It Works Test JDBC Code with an Embedded Database Test JDBC Code with Testcontainers Test Spring Data JDBC Repositories 6-6. Access Data with JPA Problem Solution How It Works Use Plain JPA Repositories Use Spring Data JPA Repositories Include Entities from Different Packages 6-7. Test with JPA Problem Solution How It Works Test JPA Code with an Embedded Database Test JPA Code with Testcontainers 6-8. Access Spring Data with MongoDB Problem Solution How It Works Use the MongoTemplate Connect to an External MongoDB Use Spring Data MongoDB Repositories Use Reactive MongoDB Repositories Test Mongo Repositories Test MongoDB Code with Testcontainers 6-9. Access Data with R2DBC Problem Solution How It Works Use DatabaseClient Use R2dbcEntityTemplate Use the R2dbcRepository 6-10. Test with Spring Data R2DBC Problem Solution How It Works Test R2DBC Code with an Embedded Database Test Spring Data R2DBC Code with Testcontainers Chapter 8: Spring Messaging 8-1. Configure JMS Problem Solution How It Works Use ActiveMQ Use Artemis Use Artemis with a Connection Pool Use JNDI Configure Manually 8-2. Send Messages Using JMS Problem Solution How It Works Send a Message with JmsTemplate Configure JmsTemplate 8-3. Receive Messages Using JMS Problem Solution How It Works Receive mMessages Configure the Listener Container Use a Custom MessageConverter Send a Reply 8-4. Configure RabbitMQ Problem Solution How It Works 8-5. Send Messages Using RabbitMQ Problem Solution How It Works Configure the RabbitTemplate Send a Simple Message Send an Object 8-6. Receive Messages Using RabbitMQ Problem Solution How It Works Receive a Simple Message Receive an Object Receive a Message and Send a Reply 8-7. Configure Spring for Apache Kafka Problem Solution How It Works 8-8. Send Messages Using Spring Kafka Problem Solution How It Works Configure the KafkaTemplate Send a Simple Message Send an Object 8-9. Receive Messages Using Kafka Problem Solution How It Works Receive a Simple Message Receive an Object Receive a Message and Send a Reply Summary Untitled Chapter 9: Spring Boot Actuator 9-1. Enable and Configure Spring Boot Actuator Problem Solution How It Works Configure the Management Server Configure Individual Management Endpoints Secure Management Endpoints Configure Health Checks Configure Metrics 9-2. Create Custom Health Checks and Metrics Problem Solution How It Works 9-3. Export Metrics Problem Solution How It Works 9-4. Tracing with Zipkin Problem Solution How It Works Configure Tracing Set Up Tracing with an ObservationRegistry Set Up Tracing with AspectJ Chapter 10: Packaging 10-1. Create an Executable Archive Problem Solution How It Works Make the Archive Executable Specify the Configuration 10-2. Create a WAR File for Deployment Problem Solution How It Works 10-3. Reduce the Archive Size Through the Thin Launcher Problem Solution How It Works 10-4. Containerize a Spring Boot Application Problem Solution How It Works Update a Build Script to Produce a Docker Container Build and Start the Container Pass Properties to the Spring Boot Application Build a Better Docker Container Use Buildpacks to Build a Container 10-5. Use Spring Boot GraalVM Native Images Problem Solution Build a Native Image Using Native Build Tools Build a Native Image Using Buildpacks How It Works Generate Source Code for Bean Definitions Generate GraalVM Hints Generate Bytecode for Proxy Classes Untitled Index Solve all your Spring Boot 3 micro-framework problems using complete, real-world Java-based code snippets and examples inspired by various problems and corresponding solutions to those problems . When you start a new project, youll be able to copy the code and configuration files from this book, and then modify them for your own specific software programming needs. This can save you a great deal of work over creating a project from scratch.Spring Boot 3 Recipeshas been revised to include new features like the new Spring Native, newly repackaged Spring Data, Spring Kafka for messaging and more on Kubernetes/deployment than in the previous edition. It includes Java 17 long term support code and Jakarta EE 9+ code as a base for Spring Boot 3. This handy code reference takes advantage of these things as it introduces you to VMWare's Spring Boot 3 and Spring Native. Quickly, it dives into code snippets on how to apply and integrate Spring Boot 3 with the Spring MVC web framework, web sockets and WebFlux for the rapid development of web applications, web services, microservices and more.You'll also get solutions to common problems with data persistence, integrating Spring Boot with batch processing, algorithmic programming via Spring Batch, and much more. These enable you to enhance or round out your web applications or microservices with a data and/or transaction-tier to boot. Other recipes cover topics such as using and integrating Boot with Spring's enterprise services, Spring Integration, testing, monitoring and more.At the end of the book, you'll have the code snippets and packages to deploy your Spring Boot-created microservices or applications on a cloud platform like Amazon using the popular Kubernetes container. Finally, this code reference is a must have for your Spring library. What You'll Learn Get reusable code recipes and snippets for the Spring Boot 3 micro-frameworkDiscover how Spring Boot 3 integrates with other Spring APIs, tools, and frameworksAccess Spring MVC, web sockets and WebFlux for easier web developmentWork with microservices for web services development and integration with your Spring Boot applicationsAdd persistence and a data tier seamlessly to make your Spring Boot web application do moreIntegrate enterprise services via Spring Integration and Jakarta EE to create a more complex Java application using Spring Boot Who This Book Is For This book is for experienced Java and Spring software programmers, developers.
دانلود کتاب Spring Boot 3 Recipes: A Problem-Solution Approach for Java Microservices and Cloud-Native Applications