Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Pass the VMware VCP-AM Develop 2022 2V0-72.22 Questions and answers with ValidTests

Exam 2V0-72.22 All Questions
Exam 2V0-72.22 Premium Access

View all detail and faqs for the 2V0-72.22 exam

Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions
Questions # 11:

Refer to the exhibit.

Question # 11

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.

Expert Solution
Questions # 12:

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

Options:

A.

@Configuration

B.

@ComponentScan

C.

@SpringBootConfiguration

D.

@SpringApplication

E.

@AutoConfiguration

Expert Solution
Questions # 13:

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

Options:

A.

@TestApplicationContext is used to define additional beans or customizations for a test.

B.

Test methods in a @SpringBootTest class are transactional by default.

C.

@SpringBootTest is typically used for integration testing.

D.

Test methods annotated with @SpringBootTest will recreate the ApplicationContext.

E.

@SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.

Expert Solution
Questions # 14:

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.

Expert Solution
Questions # 15:

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

Options:

A.

TestEntityManager provides all methods that are provided by EntityManager and more.

B.

If an embedded database is on the classpath, it will be used to configure a DataSource by default.

C.

It can be used for testing both JPA components and NoSQL components.

D.

It auto-configures a TestEntityManager bean.

E.

It can be used for testing JdbcTemplate.

Expert Solution
Questions # 16:

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) {…}

Expert Solution
Questions # 17:

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

Options:

A.

prototype

B.

singleton

C.

request

D.

session

Expert Solution
Questions # 18:

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.

Expert Solution
Questions # 19:

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

Options:

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.

Expert Solution
Questions # 20:

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.

Expert Solution
Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions