VMware

Spring Professional Develop

2V0-72.22

Prepare for the 2V0-72.22 exam to validate your skills in Spring Professional development.

192 questions 0 views Free
Start Mock Test Timed · Full-length · Scored

Questions 61–70 of 192

Q61

Which service is used for container orchestration in Spring applications?

  • A Spring Cloud Kubernetes
  • B Spring Data JPA
  • C Spring Security
  • D Spring Boot Actuator
Explanation Spring Cloud Kubernetes facilitates running Spring applications in Kubernetes environments, unlike the other options which serve different purposes.
Q62

A company needs to secure REST APIs in their application. What is the recommended approach?

  • A Use Spring Security
  • B Add manual authentication checks
  • C Use plain HTTP
  • D Ignore security, focus on performance
Explanation Spring Security is designed for securing RESTful APIs, while the other options disregard security best practices.
Q63

You are configuring a Spring Boot application for multi-tenancy. What happens when you set up a Single Database Schema per Tenant?

  • A Each tenant has its own schema
  • B All tenants share one schema
  • C No database is used
  • D Tenants get limited to read-only
Explanation Setting up a Single Database Schema per Tenant allows isolated storage per tenant, whereas the other options are functionally incorrect.
Q64

Which service enables monitoring of microservices in Spring Cloud?

  • A Spring Cloud Sleuth
  • B Spring Boot Actuator
  • C Spring Data JPA
  • D Spring Security
Explanation Spring Cloud Sleuth provides tracing and monitoring for microservices, while the others serve different purposes.
Q65

A company needs to manage different configurations for multiple environments. What should you use in Spring Boot?

  • A @Profile annotations
  • B @ConfigurationProperties
  • C @ComponentScan
  • D @RestController
Explanation @Profile annotations are specifically designed to activate different configurations based on the environment.
Q66

You are configuring a Spring Boot application with an embedded database. What happens if you set 'spring.datasource.url' to an incorrect value?

  • A Application connects to default database
  • B Application starts without connection
  • C Application fails to start
  • D Application warns but continues
Explanation Setting an incorrect datasource URL prevents the application from establishing a connection, causing startup failure.
Q67

Which service is used in Spring to manage state between sessions?

  • A Spring Session
  • B Spring Batch
  • C Spring Security
  • D Spring MVC
Explanation Spring Session manages user session states, while others serve different purposes.
Q68

A company needs to ensure data is processed in a non-blocking manner. What should they consider using?

  • A Spring AOP
  • B Spring WebFlux
  • C Spring Data JPA
  • D Spring Boot Starter
Explanation Spring WebFlux supports reactive programming, while others do not focus on non-blocking I/O.
Q69

You are configuring error handling in a Spring Boot application. What happens when an Exception is thrown?

  • A Application crashes immediately
  • B An HTTP status 500 is returned
  • C The user is logged out
  • D A custom error page is rendered
Explanation By default, a 500 status is returned unless otherwise configured.
Q70

Which component is responsible for routing HTTP requests in Spring?

  • A DispatcherServlet
  • B ApplicationContext
  • C RestController
  • D ServiceLocator
Explanation DispatcherServlet routes requests to appropriate handlers; others are not primarily for HTTP routing.