Spring is a lightweight--but at the same time flexible and universal--open source set of frameworks for creating Java applications. It is not dedicated to any particular layer, which means it can be used at the level of any layer of a Java application. This chapter will focus on the basis of Spring: the dependency injection (or inversion of control) pattern; and how to test core Spring applications with the help of JUnit 5.
A library is a collection of classes or functions that enables code reuse: we can use code created by other developers. Usually, a library is dedicated to a domain-specific area. For example, there are libraries of computer graphics that let us quickly build three-dimensional scenes and display them on the computer screen.