E-Book, Englisch, 1014 Seiten
Cosmina Pivotal Certified Professional Core Spring 5 Developer Exam
2. ed
ISBN: 978-1-4842-5136-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
A Study Guide Using Spring Framework 5
E-Book, Englisch, 1014 Seiten
ISBN: 978-1-4842-5136-2
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Pass the Pivotal Certified Professional exam for Core Spring, based on the latest Spring Framework 5, using source code examples, study summaries, and mock exams. This book now includes WebFlux, reactive programming, and more found in Spring 5. You'll find a descriptive overview of certification-related Spring modules and a single example application demonstrating the use of all required Spring modules. Furthermore, in Pivotal Certified Professional Core Spring 5 Developer Exam, Second Edition, each chapter contains a brief study summary and question set, and the book's free downloadable source code package includes one mock exam (50 questions - like a real exam). After using this study guide, you will be ready to take and pass the Pivotal Certified Professional exam.When you become Pivotal Certified, you will have one of the most valuable credentials in Java. Pivotal certification helps you advance your skills and your career, and get the maximum benefit from Spring. Passing the exam demonstrates your understanding of Spring and validates your familiarity with: container-basics, aspect oriented programming (AOP), data access and transactions, Spring Security, Spring Boot, microservices, and Spring model-view-controller (MVC). Good luck!
What You Will LearnUnderstand the core principles of Spring Framework 5Use dependency injectionWork with aspects in Spring and do AOP (aspect oriented programming)Control transactional behavior and work with SQL and NoSQL databasesCreate and secure web applications based on Spring MVCGet to know the format of the exam and the type of questions in itCreate Spring microservices applications
Who This Book Is ForSpring developers who have taken the Pivotal Core Spring class are eligible to take the Pivotal Certified Professional exam.
Iuliana Cosmina is currently a software engineer for NCR Edinburgh. She has been writing Java code since 2002 and contributed to various types of applications such as experimental search engines, ERPs, track and trace, and banking. During her career, she has been a teacher, a team leader, software architect, DevOps professional, and software manager. She is a Spring-certified Professional, as defined by Pivotal, the makers of Spring Framework, Boot, and other tools, and considers Spring the best Java framework to work with. When she is not programming, she spends her time reading, blogging, learning to play piano, travelling, hiking, or biking.
Autoren/Hrsg.
Weitere Infos & Material
1;Table of Contents;5
2;About the Author;12
3;About the Technical Reviewer;13
4;Acknowledgments;14
5;Introduction;15
6;Chapter 1: Book Overview;17
6.1;What Is Spring, and Why Should You Be Interested in It?;18
6.2;What Is the Focus of This Book?;21
6.3;Who Should Read This Book?;21
6.4;About the Certification Exam;22
6.5;How to Use This Book as a Study Guide;24
6.6;How Is This Book Structured?;24
6.6.1;How Each Chapter Is Structured;26
6.6.2;Conventions;26
6.6.3;Downloading the Code;27
6.6.4;Contacting the Author;27
6.7;Recommended Development Environment;28
6.7.1;Recommended JVM;28
6.7.2;Recommended Project Build Tool;29
6.7.3;Recommended IDE;30
6.7.4;The Project Sample;31
7;Chapter 2: Spring Bean Lifecycle and Configuration;38
7.1;Old-Style Application Development;40
7.2;Spring IoC Container and Dependency Injection;49
7.2.1;Providing Configuration via XML Files;52
7.2.2;Using Java Configuration;56
7.2.2.1;The Annotations;58
7.2.2.2;Spring Configuration Classes and the Application Context;62
7.2.2.3;Injection Types;76
7.2.2.4;Constructor Injection;82
7.2.2.5;Setter Injection;93
7.2.2.6;Field Injection;99
7.2.2.7;Bean Scopes;102
7.2.2.8;@AliasFor;118
7.2.2.9;Bean Lifecycle Under the Hood;120
7.2.2.10;Bean Declaration Inheritance;144
7.2.2.11;Injecting Dependencies That Are Not Beans;148
7.2.3;Using Bean Factories;164
7.2.3.1;More About Autowiring;172
7.2.3.2;Using Multiple Configuration Classes;178
7.3;Spring Boot;189
7.3.1;Configuration;191
7.3.1.1;Logging;203
7.4;Spring Initializr;204
7.5;Summary;210
7.6;Quiz;211
8;Chapter 3: Testing Spring Applications;215
8.1;A Few Types of Testing;216
8.2;Test-Driven Development;216
8.3;Unit and Integration Testing;218
8.3.1;Testing with Stubs;219
8.3.1.1;Unit Testing Using JUnit;225
8.3.2;Unit Testing Using JUnit 5;230
8.3.3;Testing with Mocks;234
8.3.4;EasyMock;235
8.3.5;jMock;240
8.3.6;Mockito;244
8.3.7;PowerMock;248
8.4;Testing with Spring;249
8.4.1;Testing with Spring and JUnit 4;249
8.4.2;Testing with Spring and JUnit 5;263
8.4.3;A Few Other Useful Spring Test Annotations;266
8.4.4;Using Profiles;271
8.5;Spring Boot Testing;276
8.6;Summary;283
8.7;Quick Quiz;284
8.8;Practical Exercise;286
9;Chapter 4: Aspect-Oriented Programming with Spring;291
9.1;Problems Solved by AOP;292
9.2;Spring AOP;297
9.2.1;AOP Terminology;298
9.2.2;Quick Start;299
9.2.3;Aspect Support Configuration using XML;308
9.2.4;Defining Pointcuts;309
9.2.5;Implementing Advice;319
9.2.5.1;Before;319
9.2.5.2;After Returning;321
9.2.5.3;After Throwing;323
9.2.5.4;After;325
9.2.5.5;Around;327
9.2.6;Conclusions;329
9.3;Using Aspects in a Spring Boot Application;334
9.4;Summary;335
9.5;Quick Quiz;335
9.6;Practical Exercise;336
10;Chapter 5: Data Access;338
10.1;Basic Data Access Using JDBC;339
10.2;Spring Data Access;343
10.2.1;Introducing JdbcTemplate;344
10.2.1.1;Querying with JdbcTemplate;360
10.2.1.2;Querying with NamedParameterJdbcTemplate;371
10.2.2;Spring Data Access Exceptions;378
10.3;Data Access Configuration in a Transactional Environment;382
10.4;How Transaction Management Works in Spring;386
10.4.1;Configure Transactions Support;389
10.4.1.1;Testing Transactional Methods;412
10.4.1.2;Making Third-Party Components Transactional;420
10.4.1.3;Spring Programmatic Transaction Model;428
10.4.1.4;**Distributed Transactions;429
10.5;Introducing Hibernate and ORM;431
10.5.1;Session and Hibernate Configuration;432
10.5.2;Session and Hibernate Querying;444
10.5.3;Exception Mapping;449
10.5.4;Object Relational Mapping;453
10.5.5;Java Persistence API;456
10.5.5.1;Configure Spring and JPA with Hibernate Support;458
10.5.5.2;JPA Querying;463
10.5.5.3;Advanced JPA, JTA, JNDI;467
10.6;Spring Data JPA;468
10.6.1;Spring Boot JPA;479
10.6.2;**Spring and MongoDB;483
10.7;Spring Boot Application with Embedded MongoDB;500
10.8;Summary;503
10.9;Quiz;504
11;Chapter 6: Spring Web;507
11.1;Spring Web MVC;508
11.1.1;Spring Web App Configuration;511
11.1.2;Quick Start;515
11.1.2.1;Controllers;515
11.1.2.2;Views and View Resolvers;541
11.1.3;XML Configuration;553
11.1.4;@MVC;559
11.1.5;Java Configuration for Spring MVC;561
11.1.5.1;Getting Rid of web.xml;564
11.1.6;Running a Spring Web Application;568
11.1.6.1;Running with Tomcat;570
11.1.7;Thymeleaf;577
11.1.7.1;Exception Handling;586
11.1.7.2;Testing a Spring Web Application;600
11.2;Building Web Applications Using Spring Boot;602
11.3;Summary;614
11.4;Quiz;615
12;Chapter 7: Spring Security;620
12.1;Security Basics;620
12.2;Spring Security Configuration;623
12.2.1;XML Configuration;623
12.2.2;Spring Security XML Configuration Without web.xml;642
12.2.3;Java Configuration;644
12.2.3.1;Using mvcMatchers;651
12.2.4;Security Tag Library;653
12.2.5;Method Security;658
12.2.6;Spring Security and Thymeleaf;663
12.3;Secured Spring Boot Web Applications;672
12.4;Testing Spring Boot–Secured Applications;679
12.5;Summary;685
12.6;Quiz;685
13;Chapter 8: Spring REST;687
13.1;What Is REST?;689
13.1.1;Spring Support for REST;692
13.1.1.1;HTTP Message Converters;696
13.1.2;Using Spring Boot to Expose REST Services;710
13.1.3;REST Operations;713
13.1.4;Handling Errors;720
13.1.5;Using RestTemplate to Test RESTful Applications;729
13.1.6;The Advantages of REST;749
13.1.6.1;Practice Section;750
13.1.7;Securing RESTful Spring Applications with Spring Boot;751
13.1.7.1;Basic Authentication;751
13.1.7.2;DIGEST Authentication;768
13.1.7.3;Client CERT Authentication;769
13.1.7.4;OAUTH2 API Keys;769
13.2;Summary;770
13.3;Quick Quiz;770
14;Chapter 9: Monitoring Spring Applications;773
14.1;Simple Monitoring of a Spring Application;774
14.2;Simple Monitoring of a Spring Boot Application;784
14.2.1;Default Endpoints;785
14.2.2;Exposing/Enabling and Hiding/Disabling Actuator Endpoints;797
14.2.3;Securing Actuator Endpoints;803
14.2.4;Custom Endpoints;807
14.2.5;Using Spring Boot Actuator with Micrometer;811
14.3;Summary;825
14.4;Quick Quiz;826
15;Chapter 10: Spring and Kotlin;828
15.1;Why Is Kotlin So Great?;830
15.2;Migrating a Spring Boot Application to Kotlin;837
15.2.1;Migrating the Web Interface;846
15.2.2;Creating the Entity Classes;847
15.2.3;Creating and Testing the Repositories;855
15.2.4;Creating the Controllers and Testing Them;858
15.3;Conclusion;862
16;Chapter 11: Microservices with Spring Cloud;863
16.1;Microservices with Spring;866
16.1.1;Registration and Discovery Server;870
16.1.2;Microservices Development;878
16.1.3;Microservices Communication;890
16.1.4;Things Worth Mentioning;903
16.2;Summary;908
16.3;Quick Quiz;909
17;Chapter 12: Building Reactive Applications Using Spring;911
17.1;Getting Familiar with Flux and Mono;916
17.2;Spring Boot Reactive (Hybrid) Application;922
17.3;Getting Comfortable with Spring WebFlux;934
17.4;Using Spring Data R2DBC;954
17.5;Summary;962
18;Appendix A;964
18.1;Study Guide Projects;964
18.1.1;Gradle Configuration Explained;966
18.1.2;Building and troubleshooting;968
18.1.3;Deploy on Apache Tomcat;973
18.2;Quiz answers;977
18.2.1;Quiz Solutions for Chapter 2;978
18.2.2;Quiz Solutions for Chapter 3;979
18.2.3;Quiz Solutions for Chapter 4;979
18.2.4;Quiz Solutions for Chapter 5;979
18.2.5;Quiz Solutions for Chapter 6;980
18.2.6;Quiz Solutions for Chapter 7;980
18.2.7;Quiz Solutions for Chapter 8;981
18.2.8;Quiz Solutions for Chapter 9;981
18.2.9;Exam sample;981
18.3;Answers;994
18.4;Footnote;997
19;Index;998




