Online Exam Quiz

questionQuestion  1 to 30

Which starter would you use for a Spring Boot web application?

  • spring-boot-starter-data-jpa
  • spring-boot-starter-web
  • spring-boot-starter-security
  • spring-boot-starter-test
Mark for review

What is the purpose of Spring Boot Actuator?

  • To monitor applications
  • To manage applications
  • To expose operational endpoints
  • All of the above
Mark for review

How can you define an in-memory database in Spring Boot?

  • Using application.properties
  • Using application.yml
  • Using H2 or HSQLDB dependency
  • All of the above
Mark for review

What is the use of @RequestParam in Spring Boot?

  • To extract query parameters
  • To map URI parameters
  • To configure request parameters
  • To inject beans
Mark for review

What is Spring Boot?

  • A framework
  • A library
  • A programming language
  • A database
Mark for review

What is the purpose of @RequestMapping in Spring Boot?

  • To map web requests
  • To map database requests
  • To configure security settings
  • To map application properties
Mark for review

What is the default logging framework in Spring Boot?

  • Log4j
  • SLF4J
  • Logback
  • JUL
Mark for review

What is the default scope of a Spring Bean?

  • Prototype
  • Singleton
  • Request
  • Session
Mark for review

What is the use of @ComponentScan in Spring Boot?

  • To scan components
  • To enable autowiring
  • To scan for Spring components
  • To enable caching
Mark for review

What is the use of @Cacheable annotation in Spring Boot?

  • To cache method results
  • To configure caching
  • To handle cache eviction
  • To manage cache configuration
Mark for review

What is Spring Boot DevTools?

  • A development tool suite
  • A plugin
  • A testing tool
  • A monitoring tool
Mark for review

What is the use of the @JsonIgnore annotation in Spring Boot?

  • To ignore properties in JSON
  • To enable JSON serialization
  • To enable JSON deserialization
  • To configure JSON properties
Mark for review

How do you create a custom error page in Spring Boot?

  • By creating error.html
  • By creating error.jsp
  • By configuring application.properties
  • All of the above
Mark for review

What is the use of @PathVariable in Spring Boot?

  • To extract values from URI
  • To map HTTP request body
  • To inject beans
  • To configure application properties
Mark for review

What does the @RequestBody annotation do?

  • Binds the HTTP request body
  • Maps the HTTP request to a method
  • Binds a request parameter to a method argument
  • Binds a request header to a method argument
Mark for review

How can you monitor a Spring Boot application?

  • Using Spring DevTools
  • Using Spring Actuator
  • Using Spring Boot CLI
  • Using Spring Boot Dashboard
Mark for review

Which class is the entry point of a Spring Boot application?

  • Main class
  • SpringApplication
  • ApplicationConfig
  • BootApplication
Mark for review

How do you enable asynchronous processing in Spring Boot?

  • Using @Async
  • Using @EnableAsync
  • Using @EnableAsynchronous
  • Both @Async and @EnableAsync
Mark for review

How can you read application properties in Spring Boot?

  • Using @Value
  • Using @Autowired
  • Using @ConfigurationProperties
  • Both @Value and @ConfigurationProperties
Mark for review

Which annotation is used to map HTTP GET requests onto specific handler methods?

  • @Get
  • @GetMapping
  • @RequestMapping
  • @Mapping
Mark for review

What does the @SpringBootApplication annotation do?

  • Combines @Configuration
  • Enables auto-configuration
  • Enables component scanning
  • All of the above
Mark for review

How can you configure a data source in Spring Boot?

  • Using application.properties
  • Using application.yml
  • Using DataSourceConfig class
  • All of the above
Mark for review

How do you run a Spring Boot application?

  • java run
  • mvn spring-boot
  • java -jar
  • mvn install
Mark for review

What is the use of the application.properties file in Spring Boot?

  • To configure database
  • To configure application settings
  • To configure server settings
  • All of the above
Mark for review

Which Spring Boot feature simplifies the setup of a new Spring application?

  • Spring CLI
  • Spring Initializr
  • Spring DevTools
  • Spring Actuator
Mark for review

Which annotation is used to enable scheduling in Spring Boot?

  • @Scheduled
  • @EnableScheduling
  • @EnableSchedule
  • @Schedule
Mark for review

How can you enable CORS in a Spring Boot application?

  • Using @CrossOrigin
  • Using @EnableCors
  • Using @CorsMapping
  • Using application.properties
Mark for review

What is the use of @Autowired in Spring Boot?

  • To enable autoconfiguration
  • To inject bean dependencies
  • To configure a component
  • To enable component scanning
Mark for review

How can you secure a Spring Boot application?

  • Using Spring Security
  • Using SSL
  • Using JWT
  • All of the above
Mark for review

Which file is commonly used to configure a Spring Boot application?

  • application.yml
  • config.properties
  • application.properties
  • application.conf
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review