Spring Boot Essentials Quiz for JEE Learners Quiz

  1. Core Concept of Spring Boot

    What is the primary purpose of using Spring Boot in Java development?

    1. To simplify the use of the Spring framework by reducing configuration and setup effort
    2. To replace Java completely with a new language
    3. To make manual dependency management more complex
    4. To force developers to always use XML configuration
    5. To run Java code without a runtime environment
  2. Auto-Configuration Idea

    Which feature in Spring Boot allows it to automatically configure application components based on classpath settings?

    1. Auto-configuration
    2. Manual configuration
    3. Static import
    4. Lazy initialization
    5. Manual bean registration
  3. Starter Dependencies

    What advantage do Spring Boot’s starter dependencies provide?

    1. They aggregate common dependencies, making build files cleaner and management easier
    2. They remove all dependencies from the project
    3. They require developers to update all versions manually
    4. They enforce the use of only one library in projects
    5. They increase the number of configuration files needed
  4. Annotations in Spring Boot

    Which annotation in Spring Boot combines configuration, component scanning, and auto-configuration?

    1. @SpringBootApplication
    2. @ComponentScanAnn
    3. @SpringConfiguration
    4. @AutoComponentScan
    5. @ConfigureAnnotation
  5. EnableAutoConfiguration Usage

    What is the function of the @EnableAutoConfiguration annotation in a Spring Boot project?

    1. It enables auto-configuration for the application
    2. It disables all configuration settings
    3. It only allows manual bean registration
    4. It encrypts configuration files
    5. It runs the application in debug mode by default
  6. Application Properties File

    Where should you define the property to change the default port of the embedded web server in Spring Boot?

    1. In the application.properties file
    2. Inside the main() method
    3. In pom.xml only
    4. Directly in JAVA_HOME
    5. In the Dockerfile
  7. Spring Boot CLI

    What is the main benefit of using the Spring Boot command-line interface (CLI)?

    1. It allows writing Spring Boot applications with Groovy, reducing boilerplate code
    2. It forces all applications to use only Java syntax
    3. It disables starter dependencies entirely
    4. It increases the need for XML configuration
    5. It’s only used for deploying to remote servers
  8. Spring Boot Actuator

    What is the purpose of the Spring Boot Actuator?

    1. To provide insights and metrics about a running application through endpoints and JMX
    2. To initiate applications on multiple servers simultaneously
    3. To replace the need for starter dependencies
    4. To compile Groovy files into Java code automatically
    5. To encrypt all classpath resources
  9. Securing Actuator Endpoints

    Why should Actuator endpoints be secured in a Spring Boot application?

    1. Because they expose sensitive operational information and management functions
    2. Because they automatically log user passwords
    3. Because they generate random usernames for all users
    4. Because they slow down the main application significantly
    5. Because they delete application logs automatically
  10. Difference in Key Annotations

    What is one main difference between @SpringBootApplication and @EnableAutoConfiguration?

    1. @SpringBootApplication also enables component scanning, while @EnableAutoConfiguration only enables auto-configuration
    2. @EnableAutoConfiguration is newer than @SpringBootApplication
    3. @SpringBootApplication disables auto-configuration by default
    4. @EnableAutoConfiguration runs the application, @SpringBootApplication does not
    5. @SpringBootApplication is only for test environments