Which annotations does @SpringBootApplication combine?
It is a meta-annotation for configuration, auto-configuration and component scanning of its package.
DI, bean scopes, auto-configuration, configuration, AOP proxies, REST and what changed in Spring Boot 4.
Pick an answer to see instantly whether you're right, with an explanation. Questions are shuffled every attempt.
@SpringBootApplication combine?It is a meta-annotation for configuration, auto-configuration and component scanning of its package.
Singleton means one instance per container, not per JVM — two contexts can each hold one.
Constructor injection produces complete, immutable objects that are trivially unit-testable — and it surfaces circular dependencies instead of hiding them.
PaymentGateway. Which does NOT resolve the ambiguity?@Lazy only defers resolution — you still get NoUniqueBeanDefinitionException.
Auto-configured beans back off when a bean of that type already exists.
Command-line args beat system properties, which beat env vars, which beat config files.
OrderService, importAll() calls this.save(), which is @Transactional. What happens?Transactional behaviour lives in the proxy; self-invocation goes straight to the target object.
CGLIB overrides methods in a generated subclass, which is impossible for final or private methods.
@MockBean in tests?@MockBean and @SpyBean were removed in Boot 4 in favour of Spring Framework’s @MockitoBean and @MockitoSpyBean.
Boot 4 defaults to Jackson 3 (tools.jackson packages); annotations remain in com.fasterxml.jackson.annotation.
E.g. @GetMapping(path = "/{id}", version = "1.1") with the version read from a header, query param, path or media type.
RestTemplate is in maintenance mode; RestClient is its fluent replacement (and HTTP service clients build on it).
Return 201 and point to the new resource with Location, e.g. ResponseEntity.created(uri).body(dto).
@Valid validation. What does Spring MVC throw?It is mapped to 400 Bad Request; handle it in a @RestControllerAdvice to return a ProblemDetail with field errors.
spring.threads.virtual.enabled=true do on Java 21+?Blocking I/O code then scales like non-blocking code; downstream limits like the DB pool become the throttle.
Enable them with @EnableResilientMethods. Circuit breakers still come from Resilience4j.
You scored 0 out of 16.