Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 12h 56m 23s Coupon code: 50OFF

VMware 2V0-72.22 Exam Questions & Answers (November 2026)

Professional Develop VMware Spring exam questions with 15 free practice questions and explained answers. Updated November 30, 2026. ยท See all VMware exams

Answer 15 scenario questions on this page and see your score as you go. No sign-up needed.

Exam Details

Exam Code
2V0-72.22
Vendor
VMware
Questions
60
Duration (minutes)
130
Passing Score
300 (Scaled)
Languages
English
Delivery
Proctored through Pearson VUE
Question Types
Single ChoiceMultiple Choice
Official Page
View Exam Page
1

Spring Core

Spring Core covers how an application defines, configures, and retrieves Spring beans. Candidates must be able to combine configuration classes, manage dependencies and scopes, and select profile-specific beans before the application context is refreshed.

Question 1 of 15 Single Choice

A notification service is a singleton bean and receives a prototype-scoped renderer through its constructor. The service must create a fresh renderer for each notification, and the team wants to retain container-managed dependency access without storing the application context. Which change meets these requirements?

A notification service is a singleton bean and receives a prototype-scoped renderer through its constructor. The service must create a fresh renderer for each notification, and the team wants to retain container-managed dependency access without storing the application context. Which change meets these requirements?

Show Answer

Correct Answer

A

Option A is correct because ObjectProvider obtains a new prototype instance when getObject() is called, matching the per-notification requirement. Option B is not correct because the prototype is resolved only when the singleton is created. Option C removes the required fresh instances. Option D can retrieve new instances, but it violates the stated requirement to avoid application-context access.

Question 2 of 15 Multiple Choice

An application starts an AnnotationConfigApplicationContext with an application configuration class. A separate persistence configuration declares a Repository bean, and the application configuration declares a Service bean that requires that repository. The team wants Spring to register both configurations and resolve the Service dependency through Java configuration. Which two changes meet these requirements?

Choose two. An application starts an AnnotationConfigApplicationContext with an application configuration class. A separate persistence configuration declares a Repository bean, and the application configuration declares a Service bean that requires that repository. The team wants Spring to register both configurations and resolve the Service dependency through Java configuration. Which two changes meet these requirements?

Select 2 answers, then check them.

Show Answer

Correct Answer

A, B

Options A and B are correct because importing PersistenceConfig registers its Repository bean, and a @Bean method parameter lets Spring supply that dependency. Option C is not correct because direct calls do not express the dependency through Spring injection. Option D concerns choosing among matching beans, not registering the missing configuration. Option E leaves the beans in separate contexts.

Question 3 of 15 Single Choice

A deployment creates an AnnotationConfigApplicationContext programmatically. Its environment already has the active profile qa, while a configuration class containing the required bean is annotated with @Profile("staging"). The deployment must load the staging bean instead, and configuration registration and refresh are controlled by the application. Which action should the application take?

A deployment creates an AnnotationConfigApplicationContext programmatically. Its environment already has the active profile qa, while a configuration class containing the required bean is annotated with @Profile("staging"). The deployment must load the staging bean instead, and configuration registration and refresh are controlled by the application. Which action should the application take?

Show Answer

Correct Answer

A

Option A is correct because active profiles must be selected before refresh, when Spring evaluates the @Profile condition for bean registration. Option B is not correct because default profiles apply only when no active profile is set, and qa is already active. Option C is too late because the context has already registered its beans. Option D removes profile-based selection instead of activating staging.

2

Data Management

This topic covers database access with Spring JDBC, transaction behavior, and Spring Data JPA repositories. Candidates must be able to process query results, select transaction settings that meet application requirements, and define repository queries for JPA entities.

Question 4 of 15 Single Choice

A billing service uses JdbcTemplate to query several hundred thousand invoice rows for a nightly reconciliation. The service must update an aggregate as rows arrive, and it must not retain all invoice objects in memory. The SQL query and connection settings are already correct, and the team wants a callback suited to this processing pattern.

Which callback should the repository use to process each returned row without building a collection of results?

Show Answer

Correct Answer

A

Option A is correct because RowCallbackHandler lets the repository process each row as JdbcTemplate reads the result set without collecting mapped objects. Option B extracts and returns a result from the entire result set. Option C maps individual rows into objects, usually for a returned collection. Option D supplies statement parameters and does not process query results.

Question 5 of 15 Multiple Choice

An order service calls a ledger service through a separate Spring-managed bean. The order transaction may later roll back, but successful ledger entries must commit independently. The ledger operation can also throw a checked LedgerWriteException, and the team requires its own transaction to roll back when that exception occurs. The methods are invoked through Spring transaction proxies.

Choose two. Which changes satisfy the ledger requirements?

Select 2 answers, then check them.

Show Answer

Correct Answer

A, C

Options A and C are correct because REQUIRES_NEW gives the ledger work its own transaction, and rollbackFor makes that transaction roll back for the specified checked exception. Option B can join the caller transaction, so it does not provide independent commit behavior. Options D and E prevent the required rollback, while F rejects execution within the caller's transaction.

Question 6 of 15 Single Choice

A customer directory uses Spring Data JPA, and its Customer entity has boolean active and Instant createdAt properties. The application needs a repository query that returns every active customer created after a supplied timestamp, with the oldest matching customer first. The repository already extends JpaRepository<Customer, Long>, so only the derived method declaration is needed.

Which repository method declaration returns active customers created after the supplied time, ordered from earliest to latest creation time?

Show Answer

Correct Answer

A

Option A is correct because its derived query requires active customers, uses an after comparison, and orders by creation time ascending. Option B uses the opposite time comparison and descending order. Option C uses an OR condition and descending order. Option D omits the requested ordering and returns a single customer rather than a list.

3

Spring MVC

This topic covers Spring MVC request handling and REST clients. Candidates must map HTTP requests to controller methods, return suitable responses, and use RestTemplate to call REST services.

Question 7 of 15 Single Choice

A Spring MVC service exposes an order endpoint under the class-level path /api/orders. The application already has JSON message converters, and a service method returns either an OrderDto or null for a supplied identifier. The API contract requires GET requests to return the DTO with status 200 when found and status 404 when no order exists. Which controller implementation meets the endpoint contract?

Which controller implementation meets the endpoint contract?

Show Answer

Correct Answer

B

Option B matches the class-level path and handles both outcomes, returning a JSON response for a found order and a 404 response for a missing one. Option A uses view handling because @Controller alone does not make the returned DTO a response body. Option C uses POST instead of GET. Option D repeats the class path, and Option E always returns 404.

Question 8 of 15 Multiple Choice

A Spring MVC application must call an external reservation service when a user submits a booking. The service accepts JSON only through POST, requires an authorization header, and returns both an HTTP status and a ReservationReceipt body. The application already has a RestTemplate instance, and the client must examine the status before accepting the receipt. Choose two approaches that meet the client requirements.

Choose two approaches that meet the client requirements.

Select 2 answers, then check them.

Show Answer

Correct Answer

A, B

Options A and B send a POST with an HttpEntity that can carry the JSON content type and authorization header, and both return a response object containing status and body. Option C sends GET, not POST. Option D sends PUT and does not return a response entity. Option E returns the body object, so the client cannot inspect the HTTP status.

4

Testing

Candidates must be able to write JUnit Jupiter tests that load and use the Spring test context. They must also configure database-backed tests so fixtures are available and test changes are isolated.

Question 9 of 15 Single Choice

A service team is moving its integration tests from JUnit 4 to JUnit Jupiter. One test must load the existing AppConfig class and receive a Spring-managed OrderService through constructor injection. The team wants a class-level annotation that establishes both the Spring test context and Jupiter integration, rather than maintaining separate setup mechanisms.

Which setup should the team use so that the test runs with JUnit Jupiter, loads the Spring configuration, and supports Spring dependency injection?

Show Answer

Correct Answer

A

Option A is correct because @SpringJUnitConfig combines Spring configuration loading with the JUnit Jupiter extension, allowing Spring to inject the service. Option B does not register the Jupiter extension. Option C uses the JUnit 4 runner, which is not the JUnit Jupiter integration mechanism. Option D creates Mockito-managed objects rather than loading the Spring context.

Question 10 of 15 Multiple Choice

A team maintains a Spring TestContext integration test class connected to a dedicated test database. Each test method needs the same customer and account fixture rows, but the methods also update balances and create extra records. Test runs must be repeatable, and no changes from one method may affect another. The context and datasource are already configured.

Choose two. Which two changes best ensure that fixture data is available to each test and that test changes do not remain in the database?

Select 2 answers, then check them.

Show Answer

Correct Answer

A, B

Options A and B are correct because the transactional test rolls back its work, while the SQL fixture script supplies the required rows for each method. Option C is not correct because closing the context does not roll back committed database changes. Option D preserves changes instead of isolating tests. Option E provides no automatic cleanup for its inserts.

5

Security

This topic covers security concepts and the use of Spring Security to authenticate users and control their access. Candidates must configure authorization rules and apply method-level security where service operations require specific permissions.

Question 11 of 15 Single Choice

A finance application uses Spring Security with a configured user store. Reporting staff receive the authority `ROLE_AUDITOR`, while other signed-in staff receive different authorities. The `/reports/**` paths must be restricted to reporting staff, and `/health` must remain public. The security team is updating its URL authorization rules and needs the correct role check for the reports.

Which authorization rule should be used for the reporting URL pattern?

Show Answer

Correct Answer

A

Option A is correct because `hasRole("AUDITOR")` checks for the authority `ROLE_AUDITOR`, which the reporting users already receive. Option B is not correct because `hasAuthority("AUDITOR")` requires an authority without the `ROLE_` prefix. Option C is not correct because `hasRole` adds that prefix. Option D is not correct because it admits any authenticated user.

Question 12 of 15 Multiple Choice

A payroll application exposes an approval service that is called by both a web interface and a scheduled internal process. Only users granted the exact authority `PAYROLL_APPROVER` may approve a payroll run. Calls to the service are made through its Spring-managed bean, and the team wants the authorization rule enforced at the service boundary rather than only on the web request.

Choose two. Which changes will enforce the approval requirement at the service method?

Select 2 answers, then check them.

Show Answer

Correct Answer

A, B

Options A and B are correct because pre and post method checks must be enabled, and the service method can then require the exact authority assigned to approvers. Option C is not correct because `@Secured` is not activated by the pre and post setting. Option D is not correct because it does not protect direct service calls. Option E is not correct because JSR-250 checks are not enabled.

6

Spring Boot

This topic covers Spring Boot features, dependency management, configuration properties, auto-configuration, and Actuator. Candidates must be able to select and override configuration, use Boot-managed dependencies, and add suitable metrics or health information.

Question 13 of 15 Single Choice

A team maintains a Maven application using the Spring Boot parent and Spring Boot Actuator. The parent version has been approved for production, and the build currently declares an explicit, newer version for the Actuator dependency. The team wants to avoid version drift while keeping the existing approved Spring Boot version. No other dependency versions need to change.

Which change best keeps the Actuator dependency aligned with the Spring Boot version managed by the project?

Show Answer

Correct Answer

A

Option A is correct because the Spring Boot parent manages the Actuator dependency version, keeping it aligned with the project. Option B can introduce an incompatible version. Option C does not replace the build dependency declaration. Option D can remove required libraries. Option E discards the benefit of centralized dependency management.

Question 14 of 15 Multiple Choice

A Spring Boot service is packaged as an executable JAR, and its configuration file sets `server.port` to 8080. Each deployment environment requires a different port, but the release process must use the same JAR and must not rebuild or edit it. Operators can change process startup arguments or environment variables, and they want the deployed value to take effect during application startup.

Choose two ways to override the packaged `server.port` value for this deployment without editing the application configuration file.

Select 2 answers, then check them.

Show Answer

Correct Answer

A, B

Options A and B are correct because Spring Boot maps `SERVER_PORT` to `server.port`, and command-line arguments can override configuration data. Option C edits the packaged file, contrary to the requirement. Option D applies the value too late. Option E changes the server dependency but does not set the requested port.

Question 15 of 15 Single Choice

A batch-processing application already uses Spring Boot Actuator and Micrometer. The operations team needs a time-series metric that increases once for every batch that finishes successfully, so it can compare completion rates across deployments. Failed batches must not increase the value, and the team wants to use the existing metric registry rather than build a separate reporting endpoint.

Which implementation best records each successfully completed batch as a custom Actuator metric?

Show Answer

Correct Answer

A

Option A is correct because a Micrometer `Counter` registered with the `MeterRegistry` can be incremented for each successful batch. Option B is not correct because a gauge reports a value that can rise or fall rather than counting events. Option C reports health status, not a count. Option D exposes data but does not register a metric.

Continue Your 2V0-72.22 Preparation

You have seen 15 questions from a full set of 79. Prepare with the 2V0-72.22 dumps PDF and the Web-Based Practice Test.

PDF

  • Compatible with All Devices
  • Printable Format
  • No Download Limits

Practice Test

  • Check your timing and weak areas
  • No Practice Limits
  • Regularly Updated
Get Full Access
  • 100% Money-Back Guarantee
  • 90 Days Free Updates
  • Instant Access

Frequently Asked Questions

Which Spring Core skills tend to demand the most careful preparation?

The challenge is understanding how bean definitions, dependencies, scopes, and profiles work together, rather than memorising each feature separately. You need to know when profile-specific beans are selected and how configuration is established before the application context is refreshed. A useful exercise is to trace a small configuration from bean definition through dependency resolution, then explain which bean the context will provide under each profile.

How demanding is the time limit for the 2V0-72.22 exam?

The exam has 60 questions and a 130-minute duration, so you have a little over two minutes per question on average. Questions about transactions, configuration, or controller behavior may take longer if you have to reason through several details. The Exam4Success Practice Test format can help you rehearse pacing and identify topics that slow you down. Review any missed or uncertain answers after each timed attempt.

Why can Spring data topics feel harder in exam preparation than in study notes?

Spring JDBC, transaction behavior, and Spring Data JPA overlap in application work, but each asks you to reason about different outcomes. A setting that suits one transaction requirement may not suit another, and repository queries must match the entity and query purpose. The Exam4Success PDF guide is useful for reviewing these distinctions away from an application environment. Make a short comparison sheet for query results, transaction settings, and repository query choices.

What often goes wrong when candidates prepare for testing and security topics?

Candidates may remember annotations or configuration terms but overlook how they affect the complete application. For testing, the Spring test context, database fixtures, and isolation of test changes must work together. For security, authorization rules and method-level permissions must match the operation being protected. Practise explaining what each configuration achieves, then check that your explanation includes both the intended behavior and the boundary it enforces.

What practical Spring development capability does this certification assess?

The objectives map to work involved in building Spring applications, including configuring beans, handling MVC requests, accessing data, testing behavior, and protecting service operations. Spring Boot configuration, dependency management, auto-configuration, and Actuator are also included. The Exam4Success PDF guide can serve as a structured review of these areas. To connect study with practice, choose one small application feature and trace its configuration, request flow, data access, and test.

Will preparing for this exam help me understand Spring MVC and REST integration?

The Spring MVC objectives cover mapping HTTP requests to controller methods and returning suitable responses. They also include using RestTemplate to call REST services, so preparation addresses both incoming requests and outbound calls. The exam also covers Spring Security, which adds access control to application operations. Use a small request flow as a study exercise, identifying the mapping, response, REST call, and any authorization rule that applies.

How can I judge whether I am ready to schedule the exam?

Start by checking whether you can explain and apply the listed topics without relying on notes, especially transaction choices, profile-specific beans, test isolation, and security rules. The exam is proctored through Pearson VUE, is in English, and has a scaled passing score of 300. The Exam4Success Practice Test can help reveal timing issues and weak areas, but its result is not the exam's scaled score. Use missed questions to target your final review.

What should I study first if I have not yet covered all six topic areas?

Begin with Spring Core and Spring Boot because configuration, dependencies, and application setup inform many other topics. Then study data management and Spring MVC, followed by testing and security, while revisiting connections between them. For example, connect database-backed tests to transaction behavior and connect service permissions to security configuration. The Exam4Success PDF guide can support topic-by-topic review. Finish by using a timed practice session to find areas needing more attention.

Exam4Success is an independent exam preparation provider and is not affiliated with or endorsed by VMware.