Quiz2Know

IT

Next-Gen Spring Boot & Cloud Architecture

Evaluate your expertise in Spring Boot 3+, GraalVM AOT compilation, Spring Cloud, and reactive microservices.

This is a free, 16-question multiple-choice quiz. Answer each question to see whether you got it right, with an explanation for every answer. There is no sign-up and no time limit — take it as many times as you like, and scroll down for the full answer key once you are done.

Question 1 of 16

0 correct

What is the primary technical requirement introduced in Spring Boot 3.0 regarding the underlying enterprise Java baseline?

Press A–D to choose · Enter to submit

Answer key & explanations

Every question in this quiz, with the correct answer marked and an explanation of why it is right. Use it to revise before or after taking the quiz above.

  1. 1.What is the primary technical requirement introduced in Spring Boot 3.0 regarding the underlying enterprise Java baseline?

    • AAdoption of Java 17 and migration to Jakarta EE 9/10 namespaces✓ Correct
    • BDeprecation of all reactive WebFlux components in favor of Servlets
    • CMandatory inclusion of GraalVM Native Build Tools in every project
    • DRemoval of all relational database support via Spring Data JPA

    Correct answer: Adoption of Java 17 and migration to Jakarta EE 9/10 namespaces

    Spring Boot 3 raised the minimum runtime baseline to Java 17 and migrated all internal package dependencies from javax.* to jakarta.*.

  2. 2.How does Spring Boot 3 generate native executables using GraalVM Ahead-Of-Time (AOT) compilation?

    • AIt interprets application bytecodes at runtime using a C++ wrapper
    • BIt evaluates configuration and registers reflection/proxy hints during the build phase✓ Correct
    • CIt replaces the Spring ApplicationContext with an embedded Docker daemon
    • DIt converts Java code directly into LLVM IR during maven test execution

    Correct answer: It evaluates configuration and registers reflection/proxy hints during the build phase

    Spring AOT inspects the application at build time to evaluate conditional configurations, generating bytecode and reachability metadata (reflection, proxies) needed by GraalVM native-image.

  3. 3.Which interface in Spring Boot 3.x allows developers to register custom GraalVM runtime reflection hints programmatically?

    • ANativeConfigurationRegistry
    • BRuntimeHintsRegistrar✓ Correct
    • CAotReflectionCustomizer
    • DGraalMetadataProvider

    Correct answer: RuntimeHintsRegistrar

    Implementing RuntimeHintsRegistrar allows developers to register reflection, resource, serialization, and proxy hints directly with Spring's AOT engine.

  4. 4.What is the function of the Observation API introduced in Micrometer and integrated into Spring Boot 3?

    • AIt replaces Spring Security filters with zero-trust network policies
    • BIt creates a single unified abstraction to record metrics, traces, and logs simultaneously✓ Correct
    • CIt observes database tables for changes using database binlogs
    • DIt monitors heap usage and triggers asynchronous garbage collections

    Correct answer: It creates a single unified abstraction to record metrics, traces, and logs simultaneously

    The Micrometer Observation API provides a single instrumented API that captures both metrics (timers, counters) and distributed traces (spans) without dual instrumentation.

  5. 5.Which configuration setting in Spring Boot 3.2 enables virtual threads for Tomcat request handling?

    • Aserver.tomcat.threads.virtual=true
    • Bspring.threads.virtual.enabled=true✓ Correct
    • Cserver.virtual-threads=enabled
    • Dspring.loom.virtual-dispatch=on

    Correct answer: spring.threads.virtual.enabled=true

    Setting 'spring.threads.virtual.enabled=true' instructs Spring Boot to configure the embedded Tomcat web server and task executors to dispatch requests using virtual threads.

  6. 6.How does the declarative HTTP interface client in Spring Framework 6 differ from Spring Cloud OpenFeign?

    • AIt runs directly over raw TCP sockets without HTTP abstraction
    • BIt is built into core Spring Web, using annotations like @HttpExchange backed by WebClient or RestClient✓ Correct
    • CIt only supports sending synchronous messages to Apache Kafka topics
    • DIt requires an external Consul or Eureka registry daemon to resolve URIs

    Correct answer: It is built into core Spring Web, using annotations like @HttpExchange backed by WebClient or RestClient

    Spring 6 introduced native HTTP Interfaces (@HttpExchange) directly into core Spring, allowing interface-driven clients backed by WebClient or the new RestClient without OpenFeign.

  7. 7.What role does the Spring Boot Testcontainers integration play during integration test runs?

    • AIt publishes container images directly to Docker Hub upon test success
    • BIt automatically starts, manages, and injects dynamic connection properties for containerized dependencies✓ Correct
    • CIt emulates AWS cloud APIs without running Docker containers
    • DIt executes JUnit test cases in parallel across Kubernetes pods

    Correct answer: It automatically starts, manages, and injects dynamic connection properties for containerized dependencies

    Spring Boot's Testcontainers support (via @ServiceConnection) starts Docker containers for databases or brokers and automatically maps their dynamic ports into Spring properties.

  8. 8.In a reactive Spring WebFlux application, what consequence occurs if a developer invokes a blocking JDBC call inside a flatMap operator?

    • AWebFlux automatically offloads the blocking call to an elastic thread pool
    • BThe Netty event loop thread is blocked, severely degrading throughput for all concurrent users✓ Correct
    • CA ReactiveExecutionException is thrown immediately at runtime
    • DThe reactive pipeline switches transparently to virtual thread scheduling

    Correct answer: The Netty event loop thread is blocked, severely degrading throughput for all concurrent users

    Netty uses a small number of event loop threads; running blocking operations directly on an event loop blocks concurrent request processing, causing system-wide latency spikes.

  9. 9.What does the @RestartScope annotation in Spring Boot DevTools achieve when used with Testcontainers?

    • AIt rebuilds container images every time code compiles
    • BIt prevents containers from shutting down across live-reload application restarts✓ Correct
    • CIt restarts the database container whenever a test fails
    • DIt scales the container replicas dynamically based on CPU load

    Correct answer: It prevents containers from shutting down across live-reload application restarts

    @RestartScope ensures that Testcontainers instances remain running between DevTools application reloads, eliminating slow container restarts during local development.

  10. 10.Which mechanism does Spring Cloud Gateway use by default to route requests asynchronously?

    • AApache Tomcat worker threads
    • BSpring WebFlux running on an event-driven Netty runtime✓ Correct
    • CBlocking Servlet filters with asynchronous I/O wrappers
    • DJava RMI direct socket proxying

    Correct answer: Spring WebFlux running on an event-driven Netty runtime

    Spring Cloud Gateway is built on Spring WebFlux, Project Reactor, and Netty, enabling high-performance, non-blocking asynchronous request routing.

  11. 11.What is the purpose of Spring Cloud Config's encryption at rest feature?

    • AIt encrypts the transport channel using mutual TLS exclusively
    • BIt decrypts encrypted configuration properties stored in Git before serving them to client microservices✓ Correct
    • CIt converts Java class bytecodes into encrypted binary payloads
    • DIt prevents containers from accessing environment variables

    Correct answer: It decrypts encrypted configuration properties stored in Git before serving them to client microservices

    Spring Cloud Config Server can store encrypted cipher values ({cipher}...) in version control and decrypt them on-the-fly using symmetric or asymmetric keys before sending them to authorized clients.

  12. 12.In Spring Data JPA, what problem does an EntityGraph primarily solve?

    • AEliminating the N+1 select queries problem by specifying fetch plans eagerly✓ Correct
    • BPreventing optimistic locking exceptions during concurrent writes
    • CAutomatically partitioning database tables into multiple shards
    • DConverting relational rows into graph database nodes

    Correct answer: Eliminating the N+1 select queries problem by specifying fetch plans eagerly

    EntityGraphs provide fine-grained control over entity fetching at query time, overriding default lazy-loading to fetch related entities in a single join query and avoiding N+1 queries.

  13. 13.How does Spring Boot Actuator protect sensitive health and configuration endpoints in production by default?

    • ABy encrypting HTTP responses with RSA private keys
    • BBy exposing only the /health endpoint over Web, hiding others unless explicitly enabled✓ Correct
    • CBy disabling the embedded web server when an actuator is present
    • DBy forcing all actuator requests through an SSH tunnel

    Correct answer: By exposing only the /health endpoint over Web, hiding others unless explicitly enabled

    For security, Spring Boot Actuator restricts default web exposure to only the /actuator/health endpoint; all other endpoints must be opted-in via management.endpoints.web.exposure.include.

  14. 14.Which component in Spring Security 6 handles OAuth2 Resource Server JWT validation?

    • AJwtAuthenticationFilter with JwtDecoder✓ Correct
    • BBasicAuthenticationEntryPoint
    • COAuth2ClientPropertiesRegistration
    • DSaml2AuthenticationProvider

    Correct answer: JwtAuthenticationFilter with JwtDecoder

    Spring Security OAuth2 Resource Server uses a configured JwtDecoder bean to verify digital signatures, timestamps, and claims before constructing an authenticated JwtAuthenticationToken.

  15. 15.What is the primary function of Connection pooling tools like HikariCP in high-throughput Spring Boot applications?

    • ATo encrypt all SQL queries in flight across the internal network
    • BTo reuse physical database connections and minimize expensive TCP and TLS handshakes✓ Correct
    • CTo distribute read queries across round-robin read replicas automatically
    • DTo cache SQL query results directly in JVM off-heap memory

    Correct answer: To reuse physical database connections and minimize expensive TCP and TLS handshakes

    HikariCP maintains a ready pool of active database connections, eliminating the high latency of establishing fresh TCP, TLS, and database authentication sessions on every query.

  16. 16.What does Spring Cloud Circuit Breaker use as its primary underlying fault-tolerance implementation in modern stacks?

    • ANetflix Hystrix
    • BResilience4j✓ Correct
    • CApache Commons Retry
    • DEnvoy Sidecar

    Correct answer: Resilience4j

    Spring Cloud Circuit Breaker defaults to Resilience4j, providing a lightweight, functional programming model for circuit breakers, rate limiters, and bulkheads following Hystrix deprecation.

More free quizzes