0
0
Spring Bootframework~20 mins

Spring Initializr for project creation in Spring Boot - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Spring Initializr Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
1:00remaining
What is the default packaging type when creating a Spring Boot project with Spring Initializr?
When you create a new Spring Boot project using Spring Initializr without changing any settings, what packaging type will the project use by default?
Awar
Bjar
Cear
Dzip
Attempts:
2 left
💡 Hint
Think about the most common way Spring Boot applications are packaged for easy execution.
📝 Syntax
intermediate
1:00remaining
Which dependency is required to create a REST API with Spring Initializr?
You want to create a REST API using Spring Boot. Which dependency should you select in Spring Initializr to get the necessary support?
ASpring Web
BSpring Data JPA
CSpring Security
DSpring Batch
Attempts:
2 left
💡 Hint
REST APIs need support for HTTP requests and controllers.
state_output
advanced
1:30remaining
What is the value of 'java.version' property in the generated Spring Boot project?
After generating a Spring Boot project with Spring Initializr targeting Java 17, what will be the value of the 'java.version' property in the generated pom.xml or build.gradle file?
A17
B11
C20
D1.8
Attempts:
2 left
💡 Hint
The Java version matches the selected target version in Spring Initializr.
🔧 Debug
advanced
2:00remaining
Why does the generated Spring Boot project fail to start after changing packaging to WAR?
You generated a Spring Boot project with Spring Initializr and changed packaging from JAR to WAR. After adding a servlet container dependency, the application fails to start with a 'No ServletContext' error. What is the most likely cause?
AThe Java version is incompatible with WAR packaging
BThe packaging type WAR is not supported by Spring Boot
CThe project is missing the Spring Web dependency
DThe main application class does not extend SpringBootServletInitializer and override configure() method
Attempts:
2 left
💡 Hint
WAR packaging requires special setup for servlet initialization.
🧠 Conceptual
expert
2:30remaining
Which statement about Spring Initializr's dependency management is true?
Consider how Spring Initializr manages dependencies in the generated project. Which of the following statements is correct?
ASpring Initializr always uses the latest available version of each dependency regardless of compatibility
BSpring Initializr requires the user to manually specify versions for all dependencies
CSpring Initializr uses a curated set of dependency versions to ensure compatibility and stability
DSpring Initializr disables dependency version management to allow full user control
Attempts:
2 left
💡 Hint
Think about how Spring Boot manages dependencies to avoid conflicts.