VMware 2V0-72.22 Practice Exam Questions & Answers
VMware 2V0-72.22 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- 2V0-72.22
- Full Name
- Professional Develop VMware Spring
- Issuing Body
- VMware
- Question Format (Our Bank)
- Multiple Choice
- Delivery
- Proctored
- Eligibility
- Training is required if you take the newer exam (2V0-72.22)
- Full Question Set
- 79 questions Get All Questions
Free 2V0-72.22 Practice Questions
Answer each question, then see the correct answer and why it is right
Question 1 Domain 6 Spring Boot
Select the two accurate statements about the status of a Health Indicator. (Choose two.)
Question 2 Domain 1 Spring Core
Select the two correct statements about testing with Spring and Spring Boot. (Choose two.)
Spring and Spring Boot offer a range of annotations and utilities for testing the different layers of an application. To build an ApplicationContext for integration tests, either @SpringBootTest or @SpringJUnitConfig can be used. The first is a specialized annotation that also brings extra capabilities such as auto-configuration, web environment simulation, and management of test properties. The second is a general-purpose annotation that combines @ContextConfiguration and @ExtendWith(SpringExtension.class).
Slice testing concentrates on one layer or feature of the application in isolation. Annotations such as @WebMvcTest, @DataJpaTest, @RestClientTest, and similar ones are used for this. They load only the beans relevant to the slice under test and mock or stub the remaining dependencies.
Question 3 Domain 1 Spring Core
Select the two accurate statements that apply when the @SpringBootApplication annotation is placed on a class. (Choose two.)
A . Spring Boot turns on auto-configuration by default.
This holds because @SpringBootApplication bundles the @EnableAutoConfiguration annotation, which activates Spring Boot's auto-configuration mechanism1.Auto-configuration tries to set up your Spring application automatically according to the jar dependencies you have added2.
B . Component scanning begins at the package where the class resides.
This holds because @SpringBootApplication includes the @ComponentScan annotation, which turns on component scanning for the package in which the application is located1.Component scanning lets Spring detect and register beans annotated with @Component, @Controller, @Service, @Repository, and so on3.
Get the complete 2V0-72.22 question set
$20$40
Question 4 Domain 5 Security
Select the three statements that describe benefits of employing Spring's Dependency Injection. (Choose three.)
C . Relationships among application components can be handled outside of the components themselves.
This holds because dependency injection lets components state what they depend on without instantiating or looking up those dependencies. An outside party, such as the Spring container, supplies them and can read its configuration from XML files, annotations, or Java code1.
D . Settings can be pulled out of the code and gathered into a compact group of files.
This holds because dependency injection separates application logic from configuration. The settings can reside in a few files that can be modified without touching the source code2.
F . Dependency injection makes components loosely coupled.
This holds because it reduces direct dependencies between components, which improves their reusability and testability. It also simplifies swapping in different implementations of the same interface3.
Question 5 Domain 6 Spring Boot
Select the statement that is correct. (Choose the best answer.)
A bean definition profile is a named logical group of bean definitions that can be turned on or off across different environments. For instance, separate profiles can be created for development, testing, and production. Spring offers the @Profile annotation to tag a bean definition or a configuration class as part of a particular profile. A profile can be enabled through the spring.profiles.active property or the ConfigurableEnvironment.setActiveProfiles() method.
The @ActiveProfiles annotation is a class-level annotation used alongside the Spring TestContext Framework to state which profiles should be enabled when an ApplicationContext is loaded for an integration test. It can be placed on any class that carries @ContextConfiguration or on a meta-annotation composed of @ContextConfiguration.
Question 6 Domain 1 Spring Core
Which two scenarios can be handled by the method-level security annotation @PreAuthorize? (Choose two.)
A . Grant access to a method according to the user's identity.
This is correct because the @PreAuthorize annotation can reference the principal object to retrieve the user's identity and verify whether it satisfies a given condition. For instance, the following expression permits access only for the user whose username is ''admin'':
@PreAuthorize(''principal.username == 'admin''')
E . Grant method access according to assigned roles.
This is correct because @PreAuthorize can invoke the hasRole, hasAnyRole, or hasAuthority methods to determine whether the user holds a particular role or authority. For instance, the following expression permits access only to users holding the role ''ADMIN'' or ''USER'':
@PreAuthorize(''hasAnyRole('ADMIN', 'USER')'')
Question 7 Domain 1 Spring Core
Which two of the following are HealthIndicators that Spring Boot Actuator configures automatically? (Select two.)
Question 8 Domain 3 Spring MVC
Which pair of annotations act as meta-annotations within the composed @SpringBootApplication annotation? (Select two.)
A . @Configuration This annotation marks a class as containing @Bean definition methods, allowing the Spring container to process it and generate bean definitions and service requests for those beans at runtime. B. @ComponentScan This annotation sets up component scanning rules for use with @Configuration classes. It offers support equivalent to Spring XML's context:component-scan element.
Question 9 Domain 3 Spring MVC
Which format is used to store passwords when the DelegatingPasswordEncoder is in use?
https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/crypto/password/DelegatingPasswordEncoder.html
Question 10 Domain 4 Testing
Select the two correct statements about the RestTemplate class. (Choose two.)
The RestTemplate class is a Spring component that offers a simple approach for interacting with RESTful web services from inside an application. It provides numerous helper methods for executing HTTP requests and processing their responses, including getForObject(), postForEntity(), exchange(), and others. It further supports automatic translation of Java objects to and from JSON or XML through HttpMessageConverter instances.
Question 11 Domain 1 Spring Core
Refer to the exhibit.
Consider the Java code fragment from a Spring application shown in the exhibit. Which statement about the example is correct? (Choose the best answer.)
https://www.baeldung.com/spring-getbean#3-retrieving-bean-by-type
Question 12 Domain 3 Spring MVC
Consult the exhibit.

Which approach allows you to assign the No Content (204) response status code? (Select the best answer.)
http://effcode.com/spring/returning-no-content-204-from-spring-controller/
Question 13 Domain 1 Spring Core
Select the two correct statements about constructor injection. (Choose two.)
Constructor injection is a method of supplying dependencies to a bean through its constructor parameters. Starting with Spring 4.3, when a bean declares only one constructor, Spring selects that constructor automatically, so the @Autowired annotation can be left out.
Constructor injection is usually preferred over field injection because it states a bean's dependencies clearly and allows them to be immutable. It also simplifies unit testing, since mock dependencies can be passed directly as constructor arguments.
Practice every 2V0-72.22 question in the full set, each one with its verified answer and a detailed explanation
Get Full AccessWhat the VMware 2V0-72.22 Exam Covers
Exam domains verified against the Official VMware 2V0-72.22 exam guide, last checked November 2026.
Domain 1 Spring Core
Cover dependency injection, bean configuration using Java code and annotations, and Spring bean lifecycle management. Master configuration options including component scanning, profiles, and property management to build flexible applications.
Domain 2 Data Management
Work with Spring JDBC templates, transaction management, and Spring Data repositories for database interactions. Understand how to handle data access exceptions and configure transaction propagation and rollback rules.
Domain 3 Spring MVC
Build web applications using Spring Boot and create RESTful controllers to handle HTTP requests across all verb types. Use RestTemplate to invoke external services and configure applications for production deployment.
Domain 4 Testing
Write unit tests with JUnit 5 and integration tests using Spring Test framework and MockMVC. Configure slice testing and database testing strategies to validate application behavior at multiple levels.
Above Practice Question from this Domain: Q10
Domain 5 Security
Implement Spring Security for authentication and authorization, and configure method-level security on application methods. Understand basic security concepts and how to secure both endpoints and service methods.
Above Practice Question from this Domain: Q4
2V0-72.22 Exam FAQ
Common questions about the exam itself
What background do I need before sitting the 2V0-72.22 exam?
Is 130 minutes enough time for all 60 questions on 2V0-72.22?
Which 2V0-72.22 objective area is typically hardest for candidates?
How long should I realistically study for 2V0-72.22?
What happens on exam day for 2V0-72.22?
Can I retake 2V0-72.22 if I fail?
How long is the VCP-AM Develop certification valid?
What job role does 2V0-72.22 prepare me for?
How does 2V0-72.22 relate to other VMware Spring certifications?
Other VMware Exams
Free practice questions for more VMware certification exams
