Online Exam Quiz

questionQuestion  1 to 30

Which annotation is used to map HTTP requests to handler methods in Spring MVC?

  • @RequestMapping
  • @GetMapping
  • @PostMapping
  • @DeleteMapping
Mark for review

What is the primary benefit of using Spring Boot in microservices architecture?

  • Simplified configuration
  • Enhanced security
  • Improved logging
  • Increased performance
Mark for review

What is the purpose of the Spring Boot DevTools?

  • To secure Spring Boot applications
  • To monitor Spring Boot applications
  • To provide additional development-time features
  • To manage Spring Boot configurations
Mark for review

How can you run a Spring Boot application from the command line?

  • Using mvn run
  • Using java -jar
  • Using spring boot run
  • Using sbt start
Mark for review

Which of the following is NOT a Spring Boot starter dependency?

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

Which annotation is used to bind application properties to a Java class in Spring Boot?

  • @BindProperties
  • @Value
  • @ConfigurationProperties
  • @PropertySource
Mark for review

Which annotation is used to define a RESTful web service in Spring Boot?

  • @RestService
  • @WebService
  • @Controller
  • @RestController
Mark for review

What is Spring Initializr used for?

  • To monitor Spring Boot applications
  • To create and bootstrap Spring Boot projects
  • To deploy Spring Boot applications
  • To secure Spring Boot applications
Mark for review

Which starter dependency is used for testing Spring Boot applications?

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

What is the purpose of the @LoadBalanced annotation in Spring Cloud?

  • To enable load balancing
  • To enable service discovery
  • To enable API gateway
  • To enable circuit breaking
Mark for review

Which tool is commonly used for service discovery in a microservices architecture?

  • Apache Kafka
  • Consul
  • Eureka
  • RabbitMQ
Mark for review

What is the default port for a Spring Boot application running on an embedded server?

  • 8080
  • 8000
  • 9090
  • 8888
Mark for review

How do you specify a custom banner in Spring Boot?

  • Create a banner.txt file
  • Create a customBanner.txt file
  • Create a banner.properties file
  • Create a banner.yml file
Mark for review

Which annotation is used to create a RestTemplate bean with load balancing?

  • @LoadBalanced
  • @RestTemplate
  • @RestClient
  • @LoadBalancer
Mark for review

What does the @FeignClient annotation do in a Spring Cloud application?

  • It declares a REST client
  • It declares a service discovery client
  • It declares a circuit breaker
  • It declares a configuration client
Mark for review

Which library is used for tracing and visualization in Spring Cloud?

  • Zipkin
  • Ribbon
  • Hystrix
  • Sleuth
Mark for review

How can you exclude a particular auto-configuration class in Spring Boot?

  • Using @ExcludeAutoConfig
  • Using @EnableAutoConfiguration(exclude = ...)
  • Using @SpringBootApplication(exclude = ...)
  • Using @ComponentScan(exclude = ...)
Mark for review

How do you define a custom endpoint in Spring Boot Actuator?

  • Implement the ActuatorEndpoint interface
  • Implement the Endpoint interface
  • Implement the Actuator interface
  • Implement the CustomEndpoint interface
Mark for review

Which Spring Boot feature provides health check endpoints?

  • Spring Boot Starter
  • Spring Boot CLI
  • Spring Boot Actuator
  • Spring Boot Data
Mark for review

Which of the following is a circuit breaker library in Spring Cloud?

  • Hystrix
  • Ribbon
  • Eureka
  • Zuul
Mark for review

What is the default scope of a Spring Bean?

  • Prototype
  • Singleton
  • Request
  • Session
Mark for review

How do you enable caching in a Spring Boot application?

  • @EnableCache
  • @EnableCaching
  • @EnableCacheManagement
  • @EnableCacheable
Mark for review

Which Spring Boot Actuator endpoint provides detailed information about application health?

  • /health
  • /info
  • /metrics
  • /status
Mark for review

What is the purpose of Spring Boot Actuator?

  • To monitor and manage Spring Boot applications
  • To secure Spring Boot applications
  • To configure Spring Boot applications
  • To deploy Spring Boot applications
Mark for review

Which annotation is used to enable a Hystrix circuit breaker?

  • @EnableHystrix
  • @EnableCircuitBreaker
  • @EnableHystrixDashboard
  • @EnableCircuit
Mark for review

What is the purpose of the @HystrixCommand annotation?

  • To configure a Hystrix command
  • To configure a Hystrix dashboard
  • To configure a Hystrix client
  • To configure a Hystrix circuit breaker
Mark for review

What is the primary purpose of the Spring Cloud Config Server?

  • Load Balancing
  • Centralized Configuration Management
  • Service Discovery
  • Authentication
Mark for review

What is the role of Spring Cloud Gateway in a microservices architecture?

  • Service Discovery
  • API Gateway
  • Centralized Configuration
  • Circuit Breaking
Mark for review

Which dependency is needed to create RESTful web services in Spring Boot?

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

What is Spring Cloud Netflix?

  • A Spring Boot starter for Netflix
  • A set of libraries for building microservices
  • A Netflix video streaming service
  • A cloud storage service
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