Skip to Content
Spring Start Here
book

Spring Start Here

by Laurentiu Spilca
October 2021
Beginner content levelBeginner
416 pages
11h 25m
English
Manning Publications
Content preview from Spring Start Here

4 The Spring context: Using abstractions

This chapter covers

  • Using interfaces to define contracts
  • Using abstractions for beans in the Spring context
  • Using dependency injection with abstractions

In this chapter, we discuss using abstraction with Spring beans. This topic is essential because in real-world projects, we often use abstractions to decouple implementations. As you’ll learn in this chapter, we ensure our application is comfortable to maintain and test by decoupling implementations.

We’ll start with a refresher on how to use interfaces to define contracts in section 4.1. To approach this subject, we begin by discussing objects’ responsibilities and find out how they fit in a standard class design of an app. We’ll use our coding skills ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Boot in Action

Spring Boot in Action

Craig Walls
The Complete Java Developer Course: From Beginner to Master

The Complete Java Developer Course: From Beginner to Master

Codestars By Rob Percival, John P. Baugh

Publisher Resources

ISBN: 9781617298691Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link