Quiz2Know

IT

Spring Boot 4 fundamentals

Check what you know about Spring Boot 4 and Spring Framework 7.

This is a free, 6-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 6

0 correct

Spring Boot 4 is built on which major version of the Spring Framework?

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.Spring Boot 4 is built on which major version of the Spring Framework?

    • ASpring Framework 5
    • BSpring Framework 6
    • CSpring Framework 7✓ Correct
    • DSpring Framework 4

    Correct answer: Spring Framework 7

    Spring Boot 4 pairs with Spring Framework 7.

  2. 2.Which package namespace does Spring Boot 4 use for the Servlet and Jakarta EE APIs?

    • Ajavax.*
    • Bjakarta.*✓ Correct
    • Corg.springframework.legacy.*
    • Dcom.sun.*

    Correct answer: jakarta.*

    Spring Boot moved fully to the jakarta.* namespace starting with Spring Boot 3, and Spring Boot 4 continues on it.

  3. 3.Which property enables virtual threads for the embedded web server in Spring Boot?

    • Aspring.threads.virtual.enabled✓ Correct
    • Bserver.threads.virtual
    • Cspring.web.virtual-threads
    • Dspring.loom.enabled

    Correct answer: spring.threads.virtual.enabled

    `spring.threads.virtual.enabled=true` switches supported executors to virtual threads.

  4. 4.Running virtual threads in a Spring Boot application requires at least which Java version?

    • AJava 11
    • BJava 17
    • CJava 21✓ Correct
    • DJava 8

    Correct answer: Java 21

    Virtual threads (Project Loom) were finalized in Java 21.

  5. 5.What is the primary goal of Spring AOT (ahead-of-time) processing in Spring Boot?

    • AFaster GraalVM native-image builds and startup✓ Correct
    • BAutomatic database migrations
    • CReplacing annotations with XML configuration
    • DCompressing the JAR file size

    Correct answer: Faster GraalVM native-image builds and startup

    AOT processing precomputes bean definitions and configuration ahead of time, which is what makes native-image builds practical.

  6. 6.Which logging feature, carried into Spring Boot 4, lets you emit logs as structured JSON (e.g. ECS or GELF format)?

    • Alogging.structured.format.console✓ Correct
    • Blogging.json.enabled
    • Cspring.logging.format=json
    • Dlogging.pattern.json

    Correct answer: logging.structured.format.console

    `logging.structured.format.console` (and `.file`) select a structured logging format such as `ecs` or `gelf`.

More free quizzes