Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Spring 5.0
Mastering Spring 5.0

Mastering Spring 5.0: Master reactive programming, microservices, Cloud Native applications, and more

Arrow left icon
Profile Icon In28Minutes Official
Arrow right icon
€22.99 €32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (3 Ratings)
eBook Jun 2017 496 pages 1st Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon In28Minutes Official
Arrow right icon
€22.99 €32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (3 Ratings)
eBook Jun 2017 496 pages 1st Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Spring 5.0

Dependency Injection

Any Java class we write depends on other classes. The other classes a class depends on are its dependencies. If a class directly creates instances of dependencies, a tight coupling is established between them. With Spring, the responsibility of creating and wiring objects is taken over by a new component called the IoC container. Classes define dependencies and the Spring Inversion of Control (IoC) container creates objects and wires the dependencies together. This revolutionary concept, where the control of creating and wiring dependencies is taken over by the container, is famously called IoC or dependency injection (DI).

In this chapter, we start with exploring the need for DI. We use a simple example to illustrate the use of DI. We will understand the important advantages of DI--easier maintainability, less coupling and improved testability. We will explore...

Understanding dependency injection

We will look at an example to understand dependency injection. We will write a simple business service that talks to a data service. We will make the code testable and see how proper use of DI makes the code testable.

The following is the sequence of steps we will follow:

  1. Write a simple example of a business service talking to a data service. When a business service directly creates an instance of a data service, they are tightly coupled to one another. Unit testing will be difficult.
  2. Make code loosely coupled by moving the responsibility of creating the data service outside the business service.
  3. Bring in the Spring IoC container to instantiate the beans and wire them together.
  4. Explore the XML and Java configuration options that Spring provides.
  5. Explore Spring unit testing options.
  6. Write real unit tests using mocking.
...

Summary

Dependency injection (or IoC) is the key feature of Spring. It makes code loosely coupled and testable. Understanding DI is the key to making the best use of Spring Framework.

In this chapter, we took a deep look at DI and the options Spring Framework provides. We also looked at examples of writing testable code and wrote a couple of unit tests.

In the next chapter, we will shift our attention toward Spring MVC, the most popular Java web MVC framework. We will explore how Spring MVC makes the development of web applications easier.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore the new features and components in Spring
  • Evolve towards micro services and cloud native applications
  • Gain powerful insights into advanced concepts of Spring and Spring Boot to develop applications more effectively
  • Understand the basics of Kotlin and use it to develop a quick service with Spring Boot

Description

Spring 5.0 is due to arrive with a myriad of new and exciting features that will change the way we’ve used the framework so far. This book will show you this evolution—from solving the problems of testable applications to building distributed applications on the cloud. The book begins with an insight into the new features in Spring 5.0 and shows you how to build an application using Spring MVC. You will realize how application architectures have evolved from monoliths to those built around microservices. You will then get a thorough understanding of how to build and extend microservices using Spring Boot. You will also understand how to build and deploy Cloud-Native microservices with Spring Cloud. The advanced features of Spring Boot will be illustrated through powerful examples. We will be introduced to a JVM language that’s quickly gaining popularity - Kotlin. Also, we will discuss how to set up a Kotlin project in Eclipse. By the end of the book, you will be equipped with the knowledge and best practices required to develop microservices with the Spring Framework.

Who is this book for?

This book is for an experienced Java developer who knows the basics of Spring, and wants to learn how to use Spring Boot to build applications and deploy them to the cloud.

What you will learn

  • Explore the new features in Spring Framework 5.0
  • Build microservices with Spring Boot
  • Get to know the advanced features of Spring Boot in order to effectively develop and monitor applications
  • Use Spring Cloud to deploy and manage applications on the Cloud
  • Understand Spring Data and Spring Cloud Data Flow
  • Understand the basics of reactive programming
  • Get to know the best practices when developing applications with the Spring Framework
  • Create a new project using Kotlin and implement a couple of basic services with unit and integration testing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 28, 2017
Length: 496 pages
Edition : 1st
Language : English
ISBN-13 : 9781787122338
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 28, 2017
Length: 496 pages
Edition : 1st
Language : English
ISBN-13 : 9781787122338
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
Mastering Spring 5.0
€41.99
Spring 5.0 Microservices
€41.99
Learning Spring Boot 2.0
€36.99
Total 120.97 Stars icon

Table of Contents

13 Chapters
Evolution to Spring Framework 5.0 Chevron down icon Chevron up icon
Dependency Injection Chevron down icon Chevron up icon
Building a Web Application with Spring MVC Chevron down icon Chevron up icon
Evolution toward Microservices and Cloud-Native Applications Chevron down icon Chevron up icon
Building Microservices with Spring Boot Chevron down icon Chevron up icon
Extending Microservices Chevron down icon Chevron up icon
Advanced Spring Boot Features Chevron down icon Chevron up icon
Spring Data Chevron down icon Chevron up icon
Spring Cloud Chevron down icon Chevron up icon
Spring Cloud Data Flow Chevron down icon Chevron up icon
Reactive Programming Chevron down icon Chevron up icon
Spring Best Practices Chevron down icon Chevron up icon
Working with Kotlin in Spring Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(3 Ratings)
5 star 33.3%
4 star 33.3%
3 star 0%
2 star 33.3%
1 star 0%
Satish Sep 10, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Hmmm
Amazon Verified review Amazon
Prakash Oct 08, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I recommend all to must read this book. Title says it's about spring but it is much more than just spring. You will learn lot about Microservices and other big data messaging tools.But "Mastering" term in this books title is quite misleading. If you are an architect or a experienced Spring programmer, then you will find this book a very basic for others it's must read.
Amazon Verified review Amazon
Jarid P. Jul 16, 2018
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I am a software engineer by profession, I picked up this book thinking it would be a nice addition to my Spring library unfortunately this book falls short in several areas. First, coverage of material is lacking. There is no depth to the context of what you are learning, for example when talking about application context, literally there is like 5 sentences going over it and most of its just about small code snippets, nothing to tie things together into the bigger picture which is Spring. Second, material is littered with typos which makes reading with comprehension slower because you have to back track a lot wondering why the last statement you read makes no sense. Lastly, the code examples seem a bit hacked and definitely incomplete with files titled "...BeforeRefactoring". All things said, despite any emotional dissatisfaction I might have with spending money for this book, but purely on content, completeness, and learning experience I wouldn't recommend this book to anyone looking to learn Spring.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.