Spring Boot Custom Starters & Modularization: Beginner's Quiz
Test your understanding of creating custom starters and modularizing applications in Spring Boot.
Questions in this quiz
15 questions on Spring Boot Custom Starters & Modularization: Beginner's Quiz. Work through them here, then start the quiz to answer them and see your score.
1.What is a Spring Boot starter?
- AA library that provides a set of dependencies
- BA configuration file for Spring Boot projects
- CA template for creating Spring Boot applications
- DA tool for deploying Spring Boot applications
2.Which file is typically used to define dependencies for a Spring Boot project?
- Aapplication.properties
- Bdependencies.json
- Cpom.xml
- Dsettings.gradle
3.What is the main benefit of creating a custom Spring Boot starter?
- ATo bundle and reuse common dependencies and configurations
- BTo reduce application startup time
- CTo enhance application security
- DTo improve application performance
4.How do you declare a dependency in a Maven-based Spring Boot project?
- AUsing a <library> tag in pom.xml
- BUsing a <module> tag in pom.xml
- CUsing a <dependency> tag in pom.xml
- DUsing a <requirement> tag in pom.xml
5.Which annotation is commonly used to enable auto-configuration in a Spring Boot application?
- A@SpringBootApplication
- B@ComponentScan
- C@Configuration
- D@EnableAutoConfiguration
6.What is modularization in the context of Spring Boot?
- AOptimizing the performance of a Spring Boot application
- BBreaking down an application into smaller, independent modules
- CCombining multiple applications into a single module
- DReducing the number of dependencies in a project
7.Which file is used to configure a Spring Boot application?
- Aapplication.properties
- Bconfig.xml
- Csettings.json
- Dapp.config
8.What is the purpose of the @SpringBootApplication annotation?
- ATo configure a Spring Boot application
- BTo mark the main class of a Spring Boot application
- CTo start a Spring Boot application
- DTo enable Spring Boot's auto-configuration and component scanning
9.In Spring Boot, what is the role of the META-INF/spring.factories file in a custom starter?
- ATo configure logging settings
- BTo define application properties
- CTo specify the main class
- DTo list the auto-configuration classes
10.Which of the following is NOT a benefit of modularizing a Spring Boot application?
- AEasier testing and debugging
- BBetter separation of concerns
- CFaster application startup
- DImproved code maintainability
11.What is the function of the @Configuration annotation in Spring Boot?
- ATo start the Spring Boot application
- BTo enable component scanning
- CTo define beans and configurations
- DTo configure security settings
12.Which command is used to run a Spring Boot application packaged as a JAR file?
- Ajava -jar <file>.jar
- Bboot start <file>.jar
- Crun <file>.jar
- Dspring run <file>.jar
13.What is the primary use of the @Component annotation in Spring Boot?
- ATo enable auto-configuration
- BTo define a configuration class
- CTo mark a class as a Spring-managed component
- DTo start the Spring Boot application
14.Which of the following is a common practice when creating a custom Spring Boot starter?
- AProviding minimal dependencies and configurations
- BAvoiding the use of annotations
- CIncluding all possible dependencies
- DUsing a single configuration file
15.What is the purpose of the @Bean annotation in Spring Boot?
- ATo enable auto-configuration
- BTo define a bean in the Spring context
- CTo configure application properties
- DTo mark a class as a Spring component