Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

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

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

Which statement defines a pointcut? (Choose the best answer.)

Options:

A.

A point in the execution of a program such as a method call or field assignment.


B.

An expression that selects one or more join points.


C.

A module that encapsulated advices.


D.

Code to be executed at each selected join point.


Expert Solution
Questions # 12:

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

Options:

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.


Expert Solution
Questions # 13:

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.


Expert Solution
Questions # 14:

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.


Expert Solution
Questions # 15:

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 # 16:

Refer to the exhibit.

Question # 16

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


Expert Solution
Questions # 17:

Which two statements are true regarding storing user details in Spring Security? (Choose two.)

Options:

A.

With a custom UserDetailsService defined in the ApplicationContext, Spring Boot still creates the default user.


B.

Passwords must be hashed and the default hashing algorithm is MD5.


C.

User details can be stored in custom storage and retrieve them by implementing the

UserDetailsService interface.


D.

User details can be stored in a database, in LDAP, or in-memory.


E.

The user details includes username and password but not authorities.


Expert Solution
Questions # 18:

Refer to the exhibit.

Question # 18

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.


Expert Solution
Questions # 19:

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.


Expert Solution
Questions # 20:

Refer to the exhibit.

Question # 20

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
Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions