0
0
Spring Bootframework~10 mins

Spring Initializr for project creation in Spring Boot - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the project type in Spring Initializr.

Spring Boot
spring init --build=[1] myproject
Drag options to blanks, or click blank then click option'
Agradle
Bmaven
Cjar
Dwar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'jar' or 'war' as the build type instead of build system type.
Confusing Gradle and Maven project types.
2fill in blank
medium

Complete the code to add the web dependency using Spring Initializr.

Spring Boot
spring init --dependencies=[1] mywebapp
Drag options to blanks, or click blank then click option'
Aweb
Bdata-jpa
Csecurity
Dbatch
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing unrelated dependencies like 'batch' or 'security' when web support is needed.
Forgetting to specify dependencies at all.
3fill in blank
hard

Fix the error in the command to generate a Gradle project with Java version 17.

Spring Boot
spring init --build=[1] --java-version=17 myapp
Drag options to blanks, or click blank then click option'
Amaven
Bgradle-kotlin
Cgradle
Dmaven-kotlin
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'maven' instead of 'gradle' for Gradle projects.
Confusing Kotlin DSL options with standard Gradle.
4fill in blank
hard

Fill both blanks to create a project with group ID and artifact ID.

Spring Boot
spring init --groupId=[1] --artifactId=[2] demoapp
Drag options to blanks, or click blank then click option'
Acom.example
Bdemoapp
Corg.project
Dmyapp
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping group ID and artifact ID values.
Using invalid formats for group ID.
5fill in blank
hard

Fill all three blanks to generate a project with package name, Java version, and packaging type.

Spring Boot
spring init --package-name=[1] --java-version=[2] --packaging=[3] myservice
Drag options to blanks, or click blank then click option'
Acom.mycompany.service
B17
Cjar
Dwar
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'war' packaging when 'jar' is expected.
Incorrect package name format.