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 21–30 of 192

Q21

You are configuring an application to use Spring Profiles. What happens if a profile is not active?

  • A Default configuration remains effective.
  • B Application will fail to start.
  • C All beans will be disabled.
  • D Only properties will be ignored.
Explanation If a profile is not active, the default configuration will be applied.
Q22

Which service in Spring is used for dependency injection?

  • A Spring Container
  • B Spring Boot
  • C Spring REST
  • D Spring Data
Explanation The Spring Container manages the lifecycle and configuration of application objects, enabling dependency injection.
Q23

A company needs to manage the state of its web application. Which feature would you use?

  • A Spring MVC Controllers
  • B Spring Session
  • C Spring AOP
  • D Spring Security
Explanation Spring Session provides capabilities to manage user session information across distributed systems.
Q24

You are configuring a Spring Batch job with multiple steps. What happens if a step fails?

  • A The job automatically retries.
  • B The job stops execution.
  • C The job reroutes to success.
  • D The job continues with the next step.
Explanation By default, a failing step will cause the entire job to stop executing unless configured to handle failures explicitly.
Q25

Which service is used to manage Spring Boot application configurations?

  • A Spring Cloud Config
  • B Spring Security
  • C Spring Data JPA
  • D Spring Batch
Explanation Spring Cloud Config provides a centralized way to manage application settings.
Q26

A company needs to ensure its Spring application can handle more load. Which feature should they implement?

  • A Service Discovery
  • B Circuit Breaker
  • C Load Balancing
  • D State Management
Explanation Load Balancing distributes incoming requests among servers to manage load effectively.
Q27

You are configuring Spring Security for a web application. What happens when you set the security filter chain order to zero?

  • A It becomes the lowest priority.
  • B It immediately block access.
  • C It becomes the highest priority.
  • D It disables the security filter.
Explanation A filter chain order of zero means it's executed first, granting it the highest priority.
Q28

Which service is primarily used for managing microservices in a Spring application?

  • A Spring Cloud
  • B Spring Batch
  • C Spring Data
  • D Spring Security
Explanation Spring Cloud provides tools and frameworks for managing microservices architectures, while the others serve different purposes.
Q29

A company needs to implement a custom authentication mechanism in their Spring application. What should they primarily extend?

  • A UserDetailsService
  • B AuthenticationProvider
  • C WebSecurityConfigurerAdapter
  • D SecurityFilterChain
Explanation Extending AuthenticationProvider allows custom authentication logic; UserDetailsService is for user fetching.
Q30

You are configuring Spring MVC. What happens when you set 'requestMappingHandlerMapping' to null?

  • A All mappings will fail
  • B Default mappings are used
  • C Only static resources work
  • D Application starts without errors
Explanation Setting 'requestMappingHandlerMapping' to null disables all request mappings, causing them to fail.