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 131–140 of 192

Q131

A company needs to securely expose REST APIs. Which tool should they use?

  • A Spring Security
  • B Spring AOP
  • C Spring Batch
  • D Spring Test
Explanation Spring Security is specifically designed for securing applications and APIs.
Q132

What happens when a bean is annotated with @Lazy?

  • A Loaded eagerly on startup
  • B Loaded when first accessed
  • C Not loaded at all
  • D Loaded in parallel thread
Explanation @Lazy ensures the bean is only created when first referenced, saving resources.
Q133

Which service is primarily used for cloud native application management in Spring?

  • A Spring Cloud
  • B Spring Data
  • C Spring Boot
  • D Spring Security
Explanation Spring Cloud provides tools for cloud native applications, while others focus on data access, rapid application setup, and security.
Q134

A company needs to implement microservices architecture. Which feature is crucial for handling inter-service communication?

  • A Load Balancer
  • B Service Discovery
  • C Database Sharding
  • D Monolithic Deployment
Explanation Service Discovery is essential for locating service instances, unlike the other options, which support different architectures or functionalities.
Q135

What happens when you set a bean scope to 'prototype' in Spring?

  • A Single instance per application
  • B New instance on each request
  • C Shared instance across sessions
  • D Same instance for all threads
Explanation Prototype scope ensures a new instance for each request, unlike single instance or shared cases.
Q136

Which service is used for cloud configuration automation in Spring Cloud?

  • A Spring Cloud Config
  • B Spring Data
  • C Spring Security
  • D Spring Batch
Explanation Spring Cloud Config is the correct service for configuration management, while the others serve different purposes.
Q137

A company needs to communicate between two microservices securely. What Spring feature should they utilize?

  • A Spring Security
  • B Spring MVC
  • C Spring Session
  • D Spring Boot
Explanation Spring Security is essential for secure communication, while the others are not focused on security specifically.
Q138

What happens when you set an endpoint in Spring Boot to 'hidden'?

  • A It's visible to all users
  • B It's logged improperly
  • C It's accessible only to admins
  • D It's not exposed in the API
Explanation Setting an endpoint as 'hidden' prevents it from being publicly exposed, unlike the other options.
Q139

Which service in Spring Boot automatically configures beans based on dependencies?

  • A Spring Auto-Configuration
  • B Spring Data
  • C Spring Actuator
  • D Spring MVC
Explanation Spring Auto-Configuration configures beans based on classpath presence and dependencies, while others serve different purposes.
Q140

A company needs to persist large amounts of JSON data efficiently. Which Spring Data feature should they use?

  • A Spring JPA
  • B Spring Batch
  • C Spring Redis
  • D Spring Data MongoDB
Explanation Spring Data MongoDB is optimized for JSON data, while the others are designed for different data types or methods.