ProLesson 10.4Intermediate4 min readUpdated 31 October 2026
The Ultimate Spring Boot Cheat Sheet
The definitive quick reference guide for Spring Boot developers covering annotations, HTTP status codes, configurations, and Spring 2 vs 3 changes.
Bookmark this guide as your permanent quick reference for Spring Boot annotations, configurations, status codes, and interview essentials.
01Core Annotations Reference
Component Scanning & Bean Configuration
@SpringBootApplication: Meta-annotation combining@SpringBootConfiguration,@EnableAutoConfiguration, and@ComponentScan.@Configuration: Indicates a class declares one or more@Beandefinition methods.@Bean: Marks a factory method that produces a bean to be managed by the Spring IoC container.@Component: General-purpose stereotype annotation for any Spring-managed component.@Service: Stereotype for classes holding business logic.@Repository: Stereotype for data access classes; translates native SQL exceptions to SpringDataAccessException.@Primary: Gives higher precedence to a bean when multiple beans of the same type exist.@Qualifier("name"): Specifies exactly which bean to inject by name.@Scope("prototype"): Changes bean lifecycle from singleton (default) to prototype (new instance per injection).@PostConstruct/@PreDestroy: Lifecycle callbacks executed after dependency injection and before bean destruction.
Loading the rest of the lesson…