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

Welcome To DumpsPedia

2V0-72.22 Sample Questions Answers

Questions 4

Which following statements are true about Spring Data? (Choose two.)

Options:

A.

Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.

B.

Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.

C.

Spring Data can greatly reduce the amount of “boilerplate” code typically needed for data access.

D.

Spring Data is specifically designed for JPA, JDBC, and relational database access only.

E.

Spring Data cannot be used together with Spring MVC.

Buy Now
Questions 5

Refer to the exhibit.

How can a Spring Bean be created from this LegacySingleton class?

Options:

A.

Call LegacySingleton.getInstance() from within a @Bean method and return the instance.

B.

Return an instance of LegacySingleton using the new keyword from a @Bean method.

C.

It is not possible without modifying the LegacySingleton class, the constructor must be public.

D.

Modify the LegacySingleton class by adding the @Autowired annotation to the instance variable.

Buy Now
Questions 6

Which two statements are true about Spring AOP? (Choose two.)

Options:

A.

The @After advice type is invoked regardless of whether a method successfully returned or an exception was thrown.

B.

In Spring AOP, a join point represents a method execution or property access.

C.

Spring AOP does not use AspectJ's pointcut expression language.

D.

Examples of cross-cutting concerns include security, caching, transaction.

E.

There are in total 4 types of advice, @Before, @After, @AfterReturning and @AfterThrowing.

Buy Now
Questions 7

Refer to the exhibit.

Which two statements are correct regarding the HelloAutoConfig auto-configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)

Options:

A.

A HelloService bean will be created from the helloService() method even if the

HelloService.class is not in the classpath.

B.

A HelloService bean will be created from the helloService() method only when there is no other

HelloService bean in the ApplicationContext.

C.

This auto-configuration class is used only when the HelloService.class is not on the classpath.

D.

This auto-configuration class is used only when the HelloService.class is on the classpath.

E.

A HelloService bean will be created from the helloService() method and will replace existing a

HelloService bean in the ApplicationContext.

Buy Now
Questions 8

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.)

Options:

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.

Buy Now
Questions 9

Refer to the exhibit.

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

Options:

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.

Buy Now
Questions 10

Refer to the exhibit.

Which two methods will be implemented at runtime if declared in a Spring Data JPA Repository? (Choose two.)

Options:

A.

public Customer getsingle(Long id);

B.

public Customer findFirstOrderDateMax();

C.

public Customer findByEmail(String email);

D.

public Customer findFirstByOrderDateBetween(Date d1, Date d2);

E.

public Customer findCustomerByName(String name);

Buy Now
Questions 11

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

Options:

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.

Buy Now
Questions 12

Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)

Options:

A.

Mocking a Spring Bean requires annotating it with @MockBean annotation.

B.

If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.

C.

Mocks cannot be used in a Spring Boot web slice test.

D.

Mocking a Spring Bean requires annotating it with @Mock annotation.

Buy Now
Questions 13

Which two statements are true concerning constructor injection? (Choose two.)

Options:

A.

If there is only one constructor the @Autowired annotation is not required.

B.

Constructor injection only allows one value to be injected.

C.

Constructor injection is preferred over field injection to support unit testing.

D.

Construction injection can be used with multiple constructors without @Autowired annotation.

E.

Field injection is preferred over constructor injection from a unit testing standpoint.

Buy Now
Questions 14

Which three types can be used as @Controller method arguments? (Choose three.)

Options:

A.

Locale

B.

Principal

C.

Language

D.

Session

E.

Request

F.

HttpSession

Buy Now
Questions 15

Which two statements are correct regarding the Health Indicator status? (Choose two.)

Options:

A.

The last status in a sorted list of HealthIndicators is used to derive the final system health.

B.

The status with the least severity is used as the top-level status.

C.

Custom status values can be created.

D.

The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.

E.

The severity order cannot be changed due to security reasons.

Buy Now
Questions 16

Which two are required to use transactions in Spring? (Choose two.)

Options:

A.

Add @EnableTransactionManagement to a Java configuration class.

B.

Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional

annotation.

C.

A class must be annotated with @Service and @Transaction.

D.

A class requiring a transaction must implement the TransactionInterceptor interface.

E.

Write a Spring AOP advice to implement transactional behavior.

Buy Now
Questions 17

Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

Options:

A.

BeanPostProcessors are called before the dependencies have been injected.

B.

Custom BeanPostProcessors can be implemented for Spring applications.

C.

BeanPostProcessors are called before the BeanFactoryPostProcessors.

D.

BeanPostProcessors are called during the initialization phase of a bean life cycle.

E.

BeanPostProcessors cannot be ordered in a Spring Boot application.

Buy Now
Questions 18

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

Options:

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.

Buy Now
Questions 19

Refer to the exhibit.

AppConfig is a Java configuration class. Which two statements are true? (Choose two.)

Options:

A.

The clientService bean declared will have prototype scope by default.

B.

The name of the clientService() method is invalid and will throw an error.

C.

The clientService bean will be lazy initialized the first time accessed.

D.

The bean is of type clientService and by default will be a Singleton.

E.

The Java configuration can be profile specific by adding a @Profile annotation.

Buy Now
Questions 20

Given an ApplicationContext containing three bean definitions of type Foo with bean ids foo1, foo2, and foo3, which three @Autowired scenarios are valid and will allow the ApplicationContext to initialize successfully? (Choose three.)

Options:

A.

@Autowired public void setFoo (Foo foo) {…}

B.

@Autowired @Qualifier (“foo3”) Foo foo;

C.

@Autowired public void setFoo (@Qualifier (“foo1”) Foo foo) {…}

D.

@Autowired private Foo foo;

E.

@Autowired private Foo foo2;

F.

@Autowired public void setFoo(Foo foo2) {…}

Buy Now
Questions 21

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

Options:

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.

Buy Now
Questions 22

Spring Boot will find and load property files in which of the following? (Choose the best answer.)

Options:

A.

A *.properties file matching the name of the class annotated with @SpringBootApplication.

B.

config.properties or config.yml, usually located in the classpath root.

C.

application.properties or application.yml, usually located in the classpath root.

D.

env.properties or env.yml, usually located in the classpath root.

Buy Now
Questions 23

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

Options:

A.

REST is a Protocol.

B.

REST is Stateful.

C.

REST is Reliable.

D.

REST is Interoperable.

E.

REST is Relative.

Buy Now
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Last Update: Aug 2, 2025
Questions: 79
$66  $164.99
$50  $124.99
$42  $104.99
buy now 2V0-72.22