Spring Terminology
On your first day on a Spring team, someone says: "The bean isn't in the context because the starter didn't trigger the auto-configuration." Every word in that sentence has a precise meaning, and until you know them, Spring feels like magic. Learn the vocabulary once and the rest of this course reads like plain English.
Throughout the course we build one small service: library-service, a REST API where members borrow and return books. It has a BookController, a LoanService and a BookRepository.
The rule
Spring builds and wires your objects; Boot sets Spring up for you.
The two names are not synonyms.
- Spring Framework is the foundation: a toolkit that creates your objects, connects them to each other, and offers modules for web, data and security.
- Spring Boot sits on top. It picks sensible defaults, bundles a web server, and lets you start an app with one class and a
mainmethod.
Around those two sit the words you will hear every day:
| Word | Plain meaning |
|---|---|
| Bean | An object that Spring creates and manages, such as LoanService |
| Application context | The container that holds all the beans and hands them out |
| Dependency | Another object a bean needs to do its work |
| Starter | One Maven or Gradle dependency that pulls in a whole feature |
| Auto-configuration | Boot creating beans for you because it saw a library on the classpath |
| Properties | Settings in application.properties or application.yml |
@SpringBootApplication
public class LibraryApplication {
public static void main(String[] args) {
SpringApplication.run(LibraryApplication.class, args);
}
}That single run call starts Spring, builds the application context, creates every bean, and, because the web starter is present, starts an embedded Tomcat server on port 8080.
The shortcut
When you meet a sentence full of Spring words, sort each word into one of three boxes: things (bean, dependency), the place things live (application context), or the helpers that create things (starter, auto-configuration, properties). Then read the sentence again as a story about objects.
"The bean isn't in the context"
Thing and place: an object Spring should have created is missing from the container.
A common mix-up is calling every Java object a bean. A Book you create with new Book("Dune") inside a method is just an object. It becomes a bean only when Spring creates and manages it.
Drills
Answer fast — trust the rule.
What is a Spring bean?
Which name describes the container that holds all the beans?
How does Spring Boot relate to the Spring Framework?
In library-service, LoanService needs BookRepository to check stock. What is BookRepository to LoanService?
Remember
- Spring builds and wires your objects; Boot sets Spring up for you.
- Sort each word: thing (bean), place (context), or helper (starter, auto-configuration, properties).
- Trap: not every object is a bean — only the ones Spring creates and manages.
