Gutierrez | Pro Spring Boot 2 | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 520 Seiten

Gutierrez Pro Spring Boot 2

An Authoritative Guide to Building Microservices, Web and Enterprise Applications, and Best Practices
2. Auflage 2018
ISBN: 978-1-4842-3676-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

An Authoritative Guide to Building Microservices, Web and Enterprise Applications, and Best Practices

E-Book, Englisch, 520 Seiten

ISBN: 978-1-4842-3676-5
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



Quickly and productively develop complex Spring applications and microservices out of the box, with minimal concern over things like configurations. This revised book will show you how to fully leverage the Spring Boot 2 technology and how to apply it to create enterprise ready applications that just work.  It will also cover what's been added to the new Spring Boot 2 release, including Spring Framework 5 features like WebFlux, Security, Actuator and the new way to expose Metrics through Micrometer framework, and more.This book is your authoritative hands-on practical guide for increasing your enterprise Java and cloud application productivity while decreasing development time. It's a no nonsense guide with case studies of increasing complexity throughout the book. The author, a senior solutions architect and Principal Technical instructor with Pivotal, the company behind the Spring Framework, shares his experience, insights and first-hand knowledge about how Spring Boot technology works and best practices.
Pro Spring Boot 2 is an essential book for your Spring learning and reference library.
What You Will LearnConfigure and use Spring Boot 
Use non-functional requirements with Spring Boot Actuator
Carry out web development with Spring Boot
Persistence with JDBC, JPA and NoSQL Databases
Messaging with JMS, RabbitMQ and WebSockets
Test and deploy with Spring Boot
A quick look at the Spring Cloud projects
Microservices and deployment to the Cloud
Extend Spring Boot by creating your own Spring Boot Starter and @Enable feature
Who This Book Is For
Experienced Spring and Java developers seeking increased productivity gains and decreased complexity and development time in their applications and software services.


Felipe Gutierrez is a Senior Platform Architect at Pivotal, the creators of Spring Boot and Spring Framework, where he serves as a senior consultant with the Spring team. He has over 20 years of IT experience, during which time he developed programs for companies in multiple vertical industries, such as government, retail, healthcare, education, and banking. He also develops in Groovy, RabbitMQ, and other technologies. Previously he has consulted for companies such as Nokia, Apple, Redbox, and Qualcomm, among others. He received his bachelors and master's degree in computer science from Instituto Tecnologico y de Estudios Superiores de Monterrey Campus Ciudad de Mexico.

Gutierrez Pro Spring Boot 2 jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;5
2;About the Author;13
3;About the Technical Reviewer;14
4;Acknowledgments;15
5;Chapter 1: Spring Framework 5;16
5.1;A Little History;16
5.2;Design Principles and Patterns;17
5.3;Spring Framework 5;18
5.4;A Simple Spring Web Application;19
5.4.1;Using Maven for Creating a Project;19
5.4.2;Adding Dependencies;20
5.4.3;Spring Web Configuration;24
5.4.4;Classes;32
5.4.5;Running the App;38
5.4.6;Using Java Config;41
5.5;Summary;45
6;Chapter 2: Introduction to Spring Boot;46
6.1;Spring Boot;46
6.1.1;Spring Boot to the Rescue;48
6.1.2;Spring Boot CLI;49
6.2;Spring Boot Application Model;51
6.2.1;My First Spring Boot Application;52
6.3;Why Spring Boot?;57
6.3.1;Spring Boot Features;58
6.4;Summary;59
7;Chapter 3: Spring Boot Internals and Features;60
7.1;Auto-Configuration;60
7.1.1;Disable a Specific Auto-Configuration;63
7.1.2;@EnableAutoConfiguration and @Enable annotations;65
7.2;Spring Boot Features;69
7.2.1;SpringApplication Class;72
7.2.2;Custom Banner;73
7.2.3;SpringApplicationBuilder;78
7.2.4;Application Arguments;81
7.2.4.1;Accessing Arguments with an Executable JAR;83
7.3;ApplicationRunner and CommandLineRunner;83
7.3.1;Application Configuration;86
7.3.2;Configuration Properties Examples;88
7.3.2.1;Command-Line Arguments;89
7.3.2.2;Relaxed Binding;92
7.3.2.3;Changing Location and Name;93
7.3.2.4;Profile Based;94
7.3.3;Custom Properties Prefix;96
7.4;Summary;100
8;Chapter 4: Web Applications with Spring Boot;101
8.1;Spring MVC;101
8.2;Spring Boot MVC Auto-Configuration;102
8.3;Spring Boot Web: ToDo App;104
8.3.1;ToDo App;105
8.3.1.1;Domain Model: ToDo;107
8.3.1.2;Fluent API: ToDoBuilder;108
8.3.1.3;Repository: CommonRepository;109
8.3.1.4;Repository: ToDoRepository;110
8.3.1.5;Validation: ToDoValidationError;111
8.3.1.6;Validation: ToDoValidationErrorBuilder;113
8.3.1.7;Controller: ToDoController;113
8.3.2;Running: ToDo App;118
8.3.3;Testing: ToDo App;119
8.4;Spring Boot Web: Overriding Defaults;124
8.4.1;Server Overriding;124
8.4.2;JSON Date Format;126
8.4.3;Content-Type: JSON/XML;126
8.4.4;Spring MVC: Overriding Defaults;128
8.4.5;Using a Different Application Container;128
8.4.5.1;Using Jetty Server;129
8.5;Spring Boot Web: Client;129
8.5.1;ToDo Client App;130
8.5.1.1;Domain Model: ToDo;131
8.5.1.2;Error Handler: ToDoErrorHandler;132
8.5.1.3;Custom Properties: ToDoRestClientProperties;133
8.5.1.4;Client: ToDoRestClient;134
8.5.1.5;Running and Testing the Client;137
8.6;Summary;138
9;Chapter 5: Data Access with Spring Boot;140
9.1;SQL Databases;140
9.2;Spring Data;141
9.3;Spring JDBC;142
9.3.1;JDBC with Spring Boot;143
9.3.2;ToDo App with JDBC;144
9.3.2.1;Repository: ToDoRepository;146
9.3.2.2;Database Initialization: schema.sql;149
9.3.2.3;Running and Testing: ToDo App;149
9.3.2.4;H2 Console;150
9.4;Spring Data JPA;152
9.4.1;Spring Data JPA with Spring Boot;153
9.4.2;ToDo App with Spring Data JPA;154
9.4.2.1;Repository: ToDoRepository;155
9.4.2.2;Domain Model: ToDo;156
9.4.2.3;Controller: ToDoController;159
9.4.2.4;Spring Boot JPA Properties;161
9.4.2.5;Running and Testing: ToDo App;162
9.5;Spring Data REST;163
9.5.1;Spring Data REST with Spring Boot;163
9.5.2;ToDo App with Spring Data JPA and Spring Data REST;164
9.5.2.1;Running: ToDo App;165
9.5.2.2;Testing: ToDo App;167
9.5.2.3;Testing with HAL Browser: ToDo App;169
9.6;No SQL Databases;171
9.7;Spring Data MongoDB;171
9.7.1;Spring Data MongoDB with Spring Boot;172
9.7.1.1;MongoDB Installation;172
9.7.1.2;MongoDB Embedded;173
9.7.2;ToDo App with Spring Data MongoDB;174
9.7.2.1;Domain Model: ToDo;176
9.7.2.2;Running and Testing: ToDo App;177
9.7.3;ToDo App with Spring Data MongoDB REST;178
9.8;Spring Data Redis;178
9.8.1;Spring Data Redis with Spring Boot;179
9.8.2;ToDo App with Spring Data Redis;179
9.8.2.1;Domain Model: ToDo;181
9.8.2.2;Running and Testing: ToDo App;182
9.9;More Data Features with Spring Boot;183
9.9.1;Multiple Data Sources;183
9.10;Summary;184
10;Chapter 6: WebFlux and Reactive Data with Spring Boot;185
10.1;Reactive Systems;185
10.1.1;The Reactive Manifesto;185
10.2;Project Reactor;187
10.2.1;ToDo App with Reactor;187
10.2.1.1;Mono, an asynchronous [0|1] result;190
10.2.1.2;Flux: An asynchronous Sequence of [0|N] Items;193
10.3;WebFlux;196
10.3.1;WebClient;198
10.4;WebFlux and Spring Boot Auto-configuration;199
10.4.1;Using WebFlux with Spring Boot;200
10.4.1.1;ToDo App with WebFlux;200
10.4.1.1.1;Using Annotated Controllers;203
10.4.1.1.2;Using Functional Endpoints;205
10.5;Reactive Data;208
10.5.1;MongoDB Reactive Streams;208
10.5.1.1;ToDo App with Reactive Data;208
10.6;Summary;218
11;Chapter 7: Testing with Spring Boot;219
11.1;Spring Testing Framework;219
11.2;Spring Boot Testing Framework;221
11.2.1;Testing Web Endpoints;222
11.2.2;Mocking Beans;223
11.2.3;Spring Boot Testing Slices;224
11.2.3.1;@JsonTest;224
11.2.3.2;@WebMvcTest;225
11.2.3.3;@WebFluxTest;226
11.2.3.4;@DataJpaTest;226
11.2.3.5;@JdbcTest;227
11.2.3.6;@DataMongoTest;228
11.2.3.7;@RestClientTest;229
11.3;Summary;230
12;Chapter 8: Security with Spring Boot;231
12.1;Spring Security;231
12.2;Security with Spring Boot;232
12.3;ToDo App with Basic Security;232
12.3.1;Overriding Simple Security;239
12.3.2;Overriding the Default Login Page;241
12.3.3;Custom Login Page;244
12.4;Using Security with JDBC;252
12.4.1;Directory App with JDBC Security;253
12.4.2;Using the Directory App within the ToDo App;262
12.5;WebFlux Security;269
12.6;ToDo App with OAuth2;269
12.6.1;Creating the ToDo App in GitHub;273
12.7;Summary;280
13;Chapter 9: Messaging with Spring Boot;281
13.1;What Is Messaging?;281
13.2;JMS with Spring Boot;282
13.2.1;ToDo App with JMS;282
13.2.1.1;ToDo Producer;284
13.2.1.2;ToDo Consumer;285
13.2.1.3;Configuring the ToDo App;286
13.2.1.4;Running the ToDo App;292
13.2.2;Using JMS Pub/Sub;293
13.2.3;Remote ActiveMQ;294
13.3;RabbitMQ with Spring Boot;294
13.3.1;Installing RabbitMQ;295
13.3.2;RabbitMQ/AMQP: Exchanges, Bindings, and Queues;295
13.3.3;ToDo App with RabbitMQ;297
13.3.3.1;ToDo Producer;298
13.3.3.2;ToDo Consumer;300
13.3.3.3;Configuring the ToDo App;301
13.3.3.4;Running the ToDo App;304
13.3.4;Remote RabbitMQ;309
13.4;Redis Messaging with Spring Boot;310
13.4.1;Installing Redis;310
13.4.2;ToDo App with Redis;310
13.4.2.1;ToDo Producer;312
13.4.2.2;ToDo Consumer;313
13.4.2.3;Configuring the ToDo App;314
13.4.2.4;Running the ToDo App;316
13.4.3;Remote Redis;318
13.5;WebSockets with Spring Boot;319
13.5.1;ToDo App with WebSockets;319
13.5.1.1;ToDo Producer;322
13.5.1.2;Configuring the ToDo App;324
13.5.1.3;ToDo Web Client;326
13.5.1.4;Running the ToDo App;328
13.6;Summary;330
14;Chapter 10: Spring Boot Actuator;331
14.1;Spring Boot Actuator;331
14.2;ToDo App with Actuator;332
14.2.1;/actuator;337
14.2.2;/actuator/conditions;338
14.2.3;/actuator/beans;339
14.2.4;/actuator/configprops;340
14.2.5;/actuator/threaddump;341
14.2.6;/actuator/env;342
14.2.7;/actuator/health;343
14.2.8;/actuator/info;345
14.2.9;/actuator/loggers;345
14.2.10;/actuator/loggers/{name};346
14.2.11;/actuator/metrics;346
14.2.12;/actuator/mappings;348
14.2.13;/actuator/shutdown;349
14.2.14;/actuator/httptrace;351
14.2.15;Changing the Endpoint ID;352
14.2.16;Actuator CORS Support;353
14.2.17;Changing the Management Endpoints Path;353
14.2.18;Securing Endpoints;354
14.2.19;Configuring Endpoints;354
14.3;Implementing Custom Actuator Endpoints;355
14.3.1;ToDo App with Custom Actuator Endpoints;355
14.4;Spring Boot Actuator Health;365
14.4.1;ToDo App with Custom HealthIndicator;370
14.5;Spring Boot Actuator Metrics;375
14.5.1;ToDo App with Micrometer: Prometheus and Grafana;375
14.5.1.1;Prerequisites: Using Docker;378
14.5.1.2;docker-compose.yml;379
14.5.1.3;Running the ToDo App Metrics;381
14.5.2;General Stats for Spring Boot with Grafana;390
14.6;Summary;393
15;Chapter 11: Spring Integration and  Spring Cloud Stream with  Spring Boot;394
15.1;Spring Integration Primer;395
15.1.1;Programming Spring Integration;397
15.1.1.1;ToDo App with Spring Integration;397
15.1.2;Using XML;403
15.1.3;Using Annotations;406
15.1.4;Using JavaConfig;408
15.1.5;ToDo with File Integration;409
15.2;Spring Cloud Stream;416
15.2.1;Spring Cloud;416
15.2.2;Spring Cloud Stream;418
15.2.2.1;Spring Cloud Stream Concepts;418
15.2.2.2;Spring Cloud Stream Programming;420
15.2.2.3;ToDo App with Spring Cloud Stream;423
15.2.2.3.1;Source;425
15.2.2.3.2;Processor;432
15.2.2.3.3;Sink;439
15.2.2.4;Microservices;440
15.2.2.4.1;ToDo App: A Complete Flow;440
15.2.3;Spring Cloud Stream App Starters;441
15.3;Summary;442
16;Chapter 12: Spring Boot in the Cloud;443
16.1;The Cloud and Cloud-Native Architecture;443
16.2;Twelve-Factor Applications;444
16.3;Microservices;446
16.4;Preparing the ToDo App as a Microservice;447
16.5;Pivotal Cloud Foundry;448
16.5.1;PAS: Pivotal Application Service;449
16.5.2;PAS Features;450
16.5.3;Using PWS/PAS;451
16.5.4;Cloud Foundry CLI: Command-Line Interface;454
16.5.5;Log in to PWS/PAS Using the CLI Tool;454
16.5.6;Deploying the ToDo App into PAS;455
16.5.7;Creating Services;458
16.5.8;Cleaning Up;463
16.6;Summary;464
17;Chapter 13: Extending Spring Boot;465
17.1;Creating a spring-boot-starter;465
17.1.1;todo-client-spring-boot-starter;467
17.1.2;todo-client-spring-boot-autoconfigure;469
17.1.2.1;spring.factories;472
17.1.2.2;auto-configuration;472
17.1.2.3;Helper Classes;474
17.2;Creating an @Enable* Feature;477
17.3;ToDo REST API Service;481
17.4;Installing and Testing;484
17.4.1;Task Project;484
17.4.2;Running the Task App;487
17.5;Summary;489
18;Appendix A: Spring Boot CLI;490
18.1;Spring Boot CLI;490
18.1.1;The run Command;492
18.1.2;The test Command;494
18.1.3;The grab Command;497
18.1.4;The jar Command;498
18.1.5;The war Command;500
18.1.6;The install Command;501
18.1.7;The uninstall Command;502
18.1.8;The init Command;503
18.1.8.1;init Examples;505
18.1.8.2;An Alternative to the init Command;507
18.1.9;The shell Command;507
18.1.10;The help Command;508
18.2;Summary;509
19;Index;510



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.