Spring Boot Cheat Sheet 2026

The 30 highest-yield Spring Boot facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

60 questions
130 min time limit
76.00% to pass
  1. What does the `@Cacheable` annotation do when applied to a Spring service method? Caches the method return value using the method arguments as the key
  2. Which annotation triggers Bean Validation on a method parameter in a Spring MVC controller? @Valid
  3. What HTTP status code should a well-designed REST API return when a request body fails Bean Validation? 400 Bad Request
  4. What annotation is used to designate a method as a Kafka message consumer in Spring Boot? @KafkaListener
  5. A developer needs to create a new instance of a `ShoppingCart` bean every time a user starts a new HTTP session. Which bean scope should be used? session
  6. A table's primary key must be annotated. @Id
  7. In spring boot, what is the default HTML template engine? Thymeleaf
  8. What Spring Boot caching annotation would you use to conditionally cache results based on a SpEL expression? @Cacheable with the `condition` attribute
  9. What is the default `CacheManager` Spring Boot auto-configures when no cache provider dependency is on the classpath? ConcurrentMapCacheManager
  10. Which of the following is the recommended `PasswordEncoder` implementation in modern Spring Security for securely hashing and storing user passwords? `BCryptPasswordEncoder`
  11. How can you suppress the stack trace from appearing in Spring Boot's /error JSON response in production? Set server.error.include-stacktrace=never in application.properties
  12. In Spring Boot's Kafka auto-configuration, what property sets the address of the Kafka broker? spring.kafka.bootstrap-servers
  13. What exactly is an ORM? Object Relational Mapper
  14. Which Spring AMQP class is used to declare and bind a RabbitMQ queue to an exchange programmatically? RabbitAdmin
  15. Which Spring Boot property enables the inclusion of binding errors in the /error response body for validation failures? server.error.include-binding-errors=always
  16. When validation fails on a @PathVariable or @RequestParam (not @RequestBody), which exception is thrown? ConstraintViolationException
  17. Which Spring Boot property sets the default Time-To-Live for entries in a Redis cache? spring.cache.redis.time-to-live
  18. What property in `application.properties` switches the Spring Boot web application type to reactive? spring.main.web-application-type=reactive
  19. Which Reactor operator blocks the reactive pipeline until the Mono or Flux completes, returning the result synchronously? block()
  20. Maven utilizes which of the following? pom.xml
  21. What is the most recent Spring Boot version? Spring Boot 2.5.0
  22. In spring boot, which of the following can be used to manage dependencies? Gradle
  23. Which annotation enables Spring's annotation-driven caching infrastructure in a Spring Boot application? @EnableCaching
  24. What are the many types of IDEs that may be used for Spring Boot development? All the Above
  25. What is the reactive equivalent of Spring MVC's RestTemplate in Spring WebFlux? WebClient
  26. What is the purpose of the @ResponseStatus annotation when placed on a custom exception class? It maps the exception to a specific HTTP status code returned when the exception is thrown
  27. How do you enable reactive repository support for MongoDB in Spring Boot? Add spring-boot-starter-data-mongodb-reactive
  28. What does the `@EnableWebFlux` annotation do when added to a configuration class? Imports the WebFlux configuration from DelegatingWebFluxConfiguration
  29. In Spring WebFlux, what is the purpose of `WebTestClient`? A tool for testing reactive WebFlux controllers and endpoints
  30. What is the best way to include a dependency in a project? Add dependency inside pom.xml file