Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: s2p65

Easiest Solution 2 Pass Your Certification Exams

2V0-72.22 VMware Professional Develop VMware Spring Free Practice Exam Questions (2025 Updated)

Prepare effectively for your VMware 2V0-72.22 Professional Develop VMware Spring certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 1 / 2
Total 79 questions

Which statement is true? (Choose the best answer.)

A.

@ActiveProfiles is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.

B.

@ActiveProfiles is a class-level annotation that you can use to configure how the Spring TestContext Framework is bootstrapped.

C.

@ActiveProfiles is a class-level annotation that you can use to configure the locations of properties files and inlined properties to be added to the set of PropertySources in the Environment for an ApplicationContext loaded for an integration test.

D.

@ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loaded an ApplicationContext for an integration test.

Refer to the exhibit.

Based on the default Spring behavior, choose the correct answer. (Choose the best answer.)

A.

One AccountRepository bean will be instantiated since the default scope is singleton.

B.

Three AccountRepository beans will be instantiated as the accountRepository() method will be called three times.

C.

Many AccountRepository beans will be instantiated, depending how often accountRepository(), transferService() and accountService() are called.

D.

Two AccountRepository beans will be instantiated as the accountRepository() method will be called two times.

If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)

A.

Ensure a valid bean name in the @Component annotation is specified.

B.

Ensure a valid @ComponentScan annotation in the Java configuration is specified.

C.

Ensure a valid @Scope for the class is specified.

D.

Ensure a valid @Bean for the class is specified.

Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)

A.

prototype

B.

singleton

C.

request

D.

session

Refer to the exhibit.

Which option is a valid way to retrieve the account id? (Choose the best answer.)

A.

Add @PathVariable(“id”) String accountId argument to the update() handler method.

B.

Add @PathVariable long accountId argument to the update() handler method.

C.

Add @RequestParam long accountId argument to the update() handler method.

D.

Add @RequestParam(“id”) String accountId argument to the update() handler method.

Which two statements are true regarding Spring Security? (Choose two.)

A.

Access control can be configured at the method level.

B.

A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.

C.

Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.

D.

In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.

E.

It provides a strict implementation of the Java EE Security specification.

Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)

A.

@SqlMergeMode(false)

B.

@Rollback(false)

C.

@Commit

D.

@Sql(alwaysCommit=true)

E.

@Transactional(commit=true)

Which two annotations are meta-annotations on the @SpringBootApplication composed annotation? (Choose two.)

A.

@Configuration

B.

@ComponentScan

C.

@SpringBootConfiguration

D.

@SpringApplication

E.

@AutoConfiguration

Which two use cases can be addressed by the method level security annotation @PreAuthorize? (Choose two.)

A.

Allow access to a method based on user identity.

B.

Allow access to a method based on the returned object.

C.

Allow access to a method based on HTTP method.

D.

Allow access to a method based on request URL.

E.

Allow access to a method based on roles.

Refer to the exhibit.

It is a Java code fragment from a Spring application. Which statement is true with regard to the above example? (Choose the best answer.)

A.

This syntax is invalid because the result of the getBean() method call should be cast to ClientService.

B.

It will return a bean called ClientService regardless of its id or name.

C.

This syntax is invalid because the bean id must be specified as a method parameter.

D.

It will return a bean of the type ClientService regardless of its id or name.

Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)

A.

It causes Spring Boot to enable auto-configuration by default.

B.

Component scanning will start from the package of the class.

C.

All other annotations on the class will be ignored.

D.

Methods in the class annotated with @Bean will be ignored.

E.

A separate ApplicationContext will be created for each class annotated with

@SpringBootApplication.

Which two statements are true regarding a Spring Boot "fat" JAR? (Choose two.)

A.

The "fat" JAR contains both the class files and the source files for your project.

B.

The "fat" JAR requires an external Servlet container.

C.

The "fat" JAR contains compiled classes and dependencies that your code needs to run.

D.

The "fat" JAR can contain multiple embedded application servers.

E.

The "fat" JAR is created by the Spring Boot Maven plugin or Gradle plugin.

What are the two reasons Spring be used to build a Java application? (Choose two.)

A.

Spring automates a Java application build.

B.

Spring provides a Dependency Injection container.

C.

Spring automates deployment of Java applications to all of the major cloud providers.

D.

Spring provides comprehensive Java IDE support.

E.

Spring provides abstractions over infrastructure such as persistence and messaging.

Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

A.

Java system properties have higher precedence than the properties loaded from

@TestPropertySource.

B.

Properties defined @PropertySource are not loaded if @TestPropertySource is used.

C.

@TestPropertySource annotation loads a properties file relative to the root of the project by default.

D.

Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.

Refer to the exhibit.

Assume that the application is using Spring transaction management which uses Spring AOP internally.

Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)

A.

There are 2 transactions because REQUIRES_NEW always runs in a new transaction.

B.

An exception is thrown as another transaction cannot be started within an existing transaction.

C.

There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.

D.

There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.

Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

A.

It provides configuration options through which only an authenticated user can display application information.

B.

It is not enabled by default.

C.

It can be used to display arbitrary application information.

D.

It can be used to change a property value on a running application.

E.

Typically it is used to display build or source control information.

Which two statements are true regarding bean creation? (Choose two.)

A.

A Spring bean can be explicitly created by annotating methods or fields by @Autowired.

B.

A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.

C.

A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.

D.

A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.

E.

A Spring bean can be explicitly created by annotating the class with @Autowired.

Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)

A.

The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the most specific rule first and the least specific last.

B.

Spring Security can obtain URLs from Spring MVC controllers, the Spring Security configuration just needs a reference to the controller to be protected.

C.

The URLs are specified in a special properties file, used by Spring Security.

D.

The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the least specific rule first and the most specific last.

Which two statements are true about REST? (Choose two.)

A.

REST is a Protocol.

B.

REST is Stateful.

C.

REST is Reliable.

D.

REST is Interoperable.

E.

REST is Relative.

Which three statements are advantages of using Spring’s Dependency Injection? (Choose three.)

A.

Dependency injection can make code easier to trace because it couples behavior with construction.

B.

Dependency injection reduces the start-up time of an application.

C.

Dependencies between application components can be managed external to the components.

D.

Configuration can be externalized and centralized in a small set of files.

E.

Dependency injection creates tight coupling between components.

F.

Dependency injection facilitates loose coupling between components.

Page: 1 / 2
Total 79 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved