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 71–80 of 192

Q71

A company needs to persist user sessions across server restarts. What should they use?

  • A In-memory caching
  • B Session persistence mechanism
  • C Static variables
  • D Thread-local storage
Explanation A session persistence mechanism ensures session data survives restarts; others do not keep state across restart.
Q72

You are configuring Spring Security. What happens when the 'permitAll()' method is used?

  • A Secures endpoints for logged-in users
  • B Allows access to all users
  • C Requires authentication for access
  • D Blocks access to all endpoints
Explanation 'permitAll()' allows access without any restrictions; others enforce limitations on access.
Q73

Which service is used to manage microservices in Spring?

  • A Spring Cloud
  • B Spring JDBC
  • C Spring AOP
  • D Spring ORM
Explanation Spring Cloud provides tools for microservices management, while others serve different purposes.
Q74

A company needs to secure REST APIs. What should they implement?

  • A Session management
  • B OAuth2
  • C XML signatures
  • D Basic authentication
Explanation OAuth2 provides effective authorization security, unlike the other options which are less secure.
Q75

You are configuring a Spring Boot application. What happens when @SpringBootApplication is used?

  • A Starts an embedded server
  • B Automatically scans for beans
  • C Only configures web environment
  • D Ignores application.properties
Explanation @SpringBootApplication enables component scanning and auto-configuration, not just starting an embedded server.
Q76

Which service is used for managing Spring applications on Kubernetes?

  • A Spring Cloud Kubernetes
  • B Spring Data Kubernetes
  • C Spring Boot Admin
  • D Spring Cloud Stream
Explanation Spring Cloud Kubernetes integrates Spring applications with Kubernetes features; the others do not focus on Kubernetes management.
Q77

A company needs to implement service discovery for microservices. Which component is typically best for this task in Spring?

  • A Eureka Server
  • B Spring Security
  • C Zuul Proxy
  • D Spring Batch
Explanation Eureka Server provides service registry and discovery, while the others serve different purposes.
Q78

What happens when you use an @Autowired annotation on a field in a Spring bean?

  • A Dependency is injected at runtime.
  • B Field cannot be modified at all.
  • C Bean will not be created.
  • D Compilation will fail immediately.
Explanation @Autowired injects dependencies at runtime, while other options misinterpret its function.
Q79

Which service is responsible for managing microservices in Spring Cloud?

  • A Spring Cloud Config
  • B Spring Cloud Gateway
  • C Spring Cloud Kubernetes
  • D Spring Cloud Netflix
Explanation Spring Cloud Netflix provides tools for microservices, while the others serve different purposes.
Q80

A company needs to store their configuration externally. What Spring feature should they use?

  • A Spring Boot Starter
  • B Spring Cloud Config Server
  • C Spring Data JPA
  • D Spring Security
Explanation Spring Cloud Config Server manages external configurations, unlike the other options.