Black Friday Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

2V0-72.22 Professional Develop VMware Spring Questions and Answers

Questions 4

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 5

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 6

Which two statements are true regarding @WebMvcTest? (Choose two.)

Options:

A.

It auto-configures a MockMvc.

B.

It will only scan for @Controller beans in the source code.

C.

It is used for testing Spring MVC components such as @Controller with a running server.

D.

Typically it is used in combination with @MockBean when there is a dependency bean to be mocked.

E.

It is typically used with @ExtendWith(MockitoExtension.class) in JUnit 5.

Buy Now
Questions 7

Refer to the exhibit.

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

Options:

A.

CustomerRepository should be a class, not an interface.

B.

JPA annotations are required on the Customer class to successfully use Spring Data JDBC.

C.

An implementation of this repository can be automatically generated by Spring Data JPA.

D.

A class that implements CustomerRepository must be implemented and declared as a Spring Bean.

Buy Now
Questions 8

Which two statements are correct regarding the @EnableAutoConfiguration annotation? (Choose two.)

Options:

A.

It is a meta-annotation on the @SpringBootApplication composed annotation.

B.

It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.

C.

It is meta-annotation on the @SpringBootConfiguration composed annotation.

D.

It has the same effect regardless of the package of the class that is annotated with it.

E.

It ensures auto-configuration is applied before user-defined beans have been registered.

Buy Now
Questions 9

Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)

Options:

A.

EasyMock is supported out of the box.

B.

@SpringBootTest or @SpringJUnitConfig can be used for creating an ApplicationContext.

C.

Mockito spy is not supported in Spring Boot testing by default.

D.

The spring-test dependency provides annotations such as @Mock and @MockBean.

E.

Integration and slice testing are both supported.

Buy Now
Questions 10

Refer to the exhibit.

What statement is true about @DirtiesContext?

Options:

A.

It will close the existing cached ApplicationContext and recreate a new one before the test method.

B.

It will close the existing cached ApplicationContext and recreate a new one after the test method.

C.

It will keep the existing cached ApplicationContext, all changes to Spring managed beans will be reverted after the test.

D.

It will recreate only the Spring managed beans that are modified inside the test method.

Buy Now
Questions 11

Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)

Options:

A.

Auto-configuration uses @Conditional annotations to constrain when it should apply.

B.

Auto-configuration could apply when a bean is missing but not when a bean is present.

C.

Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.

D.

Auto-configuration could apply when a bean is present but not when a bean is missing.

E.

Auto-configuration is applied before user-defined beans have been registered.

Buy Now
Questions 12

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 13

What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)

Options:

A.

DataSourceHealthIndicator

B.

GoogleCloudDataStoreHealthIndicator

C.

DynamoDBHealthIndicator

D.

RabbitHealthIndicator

E.

OktaHealthIndicator

Buy Now
Questions 14

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

Options:

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.

Buy Now
Questions 15

Which three dependencies are provided by the spring-boot-starter-test? (Choose three.)

Options:

A.

Cucumber

B.

Hamcrest

C.

spring-test

D.

Junit

E.

EasyMock

F.

PowerMock

Buy Now
Questions 16

Which two options are REST principles? (Choose two.)

Options:

A.

RESTful applications use a stateless architecture.

B.

RESTful application use HTTP headers and status codes as a contract with the clients.

C.

RESTful applications cannot use caching.

D.

RESTful application servers keep track of the client state.

E.

RESTful applications favor tight coupling between the clients and the servers.

Buy Now
Questions 17

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 18

Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)

Options:

A.

Starts a new transaction but throws an exception if an active transaction already exists.

B.

Joins a transaction if one already exists; throws an exception if an active transaction does not exist.

C.

Starts a new transaction; if an active transaction already exists, it is suspended.

D.

Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.

Buy Now
Questions 19

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 20

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 21

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

Options:

A.

Allows for the transformation of Spring bean definitions after the beans have been instantiated.

B.

Allows for the transformation of Spring bean definitions before the beans are instantiated.

C.

Creates proxies for the Spring beans that require an extra behavior like transaction management.

D.

PropertySourcesPlaceholderConfigurer implements BeanFactoryPostProcessor and is used to read property values from the Spring Environment.

E.

Detects annotations such as @PostConstruct and @PreDestroy and then invokes appropriate behavior.

Buy Now
Questions 22

Which two statements are true regarding the RestTemplate class? (Choose two.)

Options:

A.

It supports asynchronous non-blocking model.

B.

It automatically supports sending and receiving Java objects.

C.

It provides convenience methods for writing REST clients.

D.

It provides convenience methods for writing REST services.

E.

Sending an HTTP request with a custom header is not possible when using RestTemplate.

Buy Now
Questions 23

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

Options:

A.

@Configuration

B.

@ComponentScan

C.

@SpringBootConfiguration

D.

@SpringApplication

E.

@AutoConfiguration

Buy Now
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Last Update: Nov 24, 2024
Questions: 79
2V0-72.22 pdf

2V0-72.22 PDF

$25.5  $84.99
2V0-72.22 Engine

2V0-72.22 Testing Engine

$30  $99.99
2V0-72.22 PDF + Engine

2V0-72.22 PDF + Testing Engine

$40.5  $134.99