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 41–50 of 192

Q41

A company needs to perform scheduled tasks in a Spring application. What should they use?

  • A @Scheduled annotation
  • B @Controller
  • C @Service
  • D @Configuration
Explanation @Scheduled annotation is designed for scheduling tasks, unlike the other annotations which serve specific roles in the application context.
Q42

You are configuring a Spring Boot application. What happens when you enable 'spring.main.allow-bean-definition-overriding'?

  • A Allows duplicate bean definitions
  • B Disables Spring context loading
  • C Increases application startup time
  • D Filters components during scanning
Explanation 'spring.main.allow-bean-definition-overriding' allows duplicate beans, while the others do not address bean definitions directly.
Q43

Which service allows you to manage application configurations in Spring?

  • A Spring Cloud Config
  • B Spring Data
  • C Spring Boot Actuator
  • D Spring Security
Explanation Spring Cloud Config provides server-side and client-side support for externalized configuration in distributed systems.
Q44

A company needs to monitor the health of its microservices in a Spring application. What should they use?

  • A Spring Boot Actuator
  • B Spring MVC
  • C Spring Security
  • D Spring AOP
Explanation Spring Boot Actuator exposes endpoints for monitoring and managing Spring applications, including health checks.
Q45

You are configuring a Spring Boot application with a database. What happens when the datasource URL is incorrect?

  • A Application starts normally
  • B Application fails to start
  • C Database connections work intermittently
  • D Application runs in memory mode
Explanation An incorrect datasource URL will cause the application to fail on startup due to connection issues.
Q46

Which service allows for building microservices?

  • A Spring Cloud
  • B Spring Boot
  • C Spring Data
  • D Spring MVC
Explanation Spring Cloud facilitates building microservices; the others serve different purposes.
Q47

A company needs to handle multiple data sources efficiently. What should they use?

  • A Spring Batch
  • B Spring Data JPA
  • C Spring Security
  • D Spring WebFlux
Explanation Spring Data JPA is suitable for managing multiple data sources versus other options.
Q48

You are configuring Spring Security. What happens when you set CSRF protection as disabled?

  • A Increased security risk
  • B Improved performance only
  • C No changes to security
  • D Reverts to default settings
Explanation Disabling CSRF protection increases security risk, while other options misrepresent its effects.
Q49

Which service allows you to manage application lifecycle in Kubernetes?

  • A Spring Cloud Kubernetes
  • B Spring Data JPA
  • C Spring Batch
  • D Spring Security
Explanation Spring Cloud Kubernetes integrates Kubernetes with Spring applications for lifecycle management, while the others focus on data access, batch processing, and security.
Q50

A company needs to decouple their microservices for better scalability. What should they implement?

  • A Monolithic architecture
  • B Synchronous API calls
  • C Asynchronous communication
  • D Direct database access
Explanation Asynchronous communication effectively decouples services, while the others create tight coupling.