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


Expert Solution
Questions # 12:

Which two options will inject the value of the daily.limit system property? (Choose two.)

Options:

A.

@Value(“#{daily.limit}”)


B.

@Value(“$(systemProperties.daily.limit)”)


C.

@Value(“$(daily.limit)”)


D.

@Value(“#{systemProperties[‘daily.limit’]}”)


E.

@Value(“#{systemProperties.daily.limit}”)


Expert Solution
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.


Expert Solution
Questions # 14:

Refer to the exhibit.

Question # 14

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.


Expert Solution
Questions # 15:

What's the password storage format when using the DelegatingPasswordEncoder?

Options:

A.

encodedPassword{id}, where {id} is an identifier used to look up which PasswordEncoder should be used.


B.

{id}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used.


C.

{timestamp}encodedPassword, where {timestamp} is the time when the password was encoded.


D.

{id}{salt}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used and {salt} a randomly generated salt.


Expert Solution
Questions # 16:

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.


Expert Solution
Questions # 17:

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

Options:

A.

@SqlMergeMode(false)


B.

@Rollback(false)


C.

@Commit


D.

@Sql(alwaysCommit=true)


E.

@Transactional(commit=true)


Expert Solution
Questions # 18:

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.


Expert Solution
Questions # 19:

Which is the correct approach to register for a bean destruction callback?

Options:

A.

Annotate the callback method with @PostDestroy.


B.

Annotate the callback method with @PreDestroy.


C.

Add the @Lazy annotation to the bean configuration.


D.

Configure the bean instance to use prototype scope.


Expert Solution
Questions # 20:

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.


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