QuizzesSpring Boot with Docker & Deployment — Concept Check
intermediate
spring-boot

Spring Boot with Docker & Deployment — Concept Check

Questions on Spring Boot with Docker & Deployment. Spring Boot Maven/Gradle plugins build OCI-compliant images via Buildpacks or a Dockerfile; layered JARs reduce rebuild time by keeping dependencies in separate layers.

7 minutes 7 questions Pass at 70%
Time Limit
7 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

7 questions on Spring Boot with Docker & Deployment — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.Your team is using Spring Boot Buildpacks to containerize an application. They notice that the image build time is longer than expected. What could be the reason?

    • ABuildpacks do not support layer caching, leading to longer build times.
    • BThe JDK selection process by Buildpacks is inefficient.
    • CThe dependencies are not cached, causing them to rebuild every time.
    • DThe application code changes frequently, causing all layers to rebuild.
  2. 2.A developer is configuring a Spring Boot application for Kubernetes deployment. They set the JVM heap size using -Xmx. What issue might this cause?

    • AThe JVM might not start due to incorrect heap size settings.
    • BThe application might use more memory than available in the container.
    • CThe JVM heap size might be too small, causing performance issues.
    • DThe application might experience OOMKills due to exceeding container limits.
  3. 3.A Spring Boot application is containerized using a multi-stage Dockerfile with layered JARs. What is the primary benefit of this approach?

    • AIt enhances the security of the Docker image.
    • BIt reduces the overall size of the Docker image.
    • CIt simplifies the Dockerfile configuration process.
    • DIt allows for faster rebuilds by caching unchanged layers.
  4. 4.During a Kubernetes deployment, the application fails to start due to memory issues. The container's memory limit is set to 512Mi. What JVM option could prevent this?

    • A-XX:+UseG1GC
    • B-XX:InitialRAMPercentage=50.0
    • C-XX:MaxRAMPercentage=75.0
    • D-Xmx512m
  5. 5.A developer uses the Spring Boot Maven plugin with Buildpacks but notices the application runs slowly in production. What could be a likely cause?

    • AThe image was not pushed to the correct registry.
    • BLayered JARs are not being used, causing slower execution.
    • CThe Buildpack selected an incorrect JDK version.
    • DThe JVM flags are not optimized for container environments.
  6. 6.A team uses layered JARs for their Spring Boot application. What is the main advantage of this method?

    • AIt reduces the size of the application JAR file.
    • BIt speeds up builds by caching dependency layers.
    • CIt simplifies the deployment process to Kubernetes.
    • DIt automatically selects the best JDK for the application.
  7. 7.A developer configures a Spring Boot application with Buildpacks and sets the environment variable BPL_JVM_HEAP_PERCENT to 75. What does this control?

    • AThe maximum heap size as a percentage of container memory.
    • BThe percentage of threads allocated to the JVM.
    • CThe percentage of CPU allocated to the JVM.
    • DThe initial heap size of the JVM.