Unit 1 Spring 1
Unit 1 Spring 1
@Component: It is a class-level annotation. It is used to mark a Java class as a bean. A Java class annotated
with @Component is found during the classpath. The Spring Framework pick it up and configure it in the
application context as a Spring Bean.
• @Controller: The @Controller is a
class-level annotation.
• It is a specialization
of @Component. It marks a class as
a web request handler. It is often used
to serve web pages.
• By default, it returns a string that
indicates which route to redirect. It is
mostly used
with @RequestMapping annotation.
Features of Spring Framework
• Inversion of Control (IoC)
loose coupling
Testability
Reusability
Modular design
• Dependency Injection (DI)
Constructor Injection
Setter Injection
Field Injection
• Aspect-Oriented Programming (AOP)
• Spring MVC
• Transaction Management
• Spring Data
• Spring Security
• Spring Boot
• Testing Support
• Internationalization and Localization
Components of Spring Boot Ecosystem
1. Spring Initializr
2. Spring Boot Starters
3. Spring Boot Auto-Configuration
4. Spring Boot Core
5. Spring Boot Actuator
6. Spring Boot DevTools
7. Spring Boot Data
8. Spring Security