nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #31

Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)

The correct answer is A. The default embedded servlet container can be replaced with Undertow. C. Spring Boot starts up an embedded servlet container by default. C is correct because Spring Boot auto-configures and starts an embedded Tomcat servlet container by default - no external server deployment needed. A is correct because Spring Boot is designed to be swappable: you can exclude spring-boot-starter-tomcat and add…

Core Spring

Question

Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)

Options

  • AThe default embedded servlet container can be replaced with Undertow.
  • BJetty is the default servlet container.
  • CSpring Boot starts up an embedded servlet container by default.
  • DThe default port of the embedded servlet container is 8088.
  • ESpring MVC starts up an in-memory database by default.

How the community answered

(41 responses)
  • A
    88% (36)
  • B
    2% (1)
  • D
    2% (1)
  • E
    7% (3)

Explanation

C is correct because Spring Boot auto-configures and starts an embedded Tomcat servlet container by default - no external server deployment needed. A is correct because Spring Boot is designed to be swappable: you can exclude spring-boot-starter-tomcat and add spring-boot-starter-undertow (or Jetty) to replace the default container.

B is wrong - Tomcat, not Jetty, is the default; Jetty is an available alternative. D is wrong - the default port is 8080, not 8088 (a common trap). E is wrong - an in-memory database (like H2) only activates if you include the H2 dependency and Spring Data JPA on the classpath; Spring MVC alone does not do this.

Memory tip: Think "Spring Boot = Tomcat by default, port 8080, and swappable" - the number 8080 and the word "Tomcat" should go together in your mind, making both the wrong port (8088) and the wrong default container (Jetty) easy to eliminate.

Topics

#Embedded Servlet Container#Spring Boot Auto-Configuration#Container Alternatives#Default Configuration

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice