Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

VMware 2V0-72.22 - Professional Develop VMware Spring

Page: 1 / 3
Total 79 questions

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

A.

@SqlMergeMode(false)

B.

@Rollback(false)

C.

@Commit

D.

@Sql(alwaysCommit=true)

E.

@Transactional(commit=true)

Refer to the exhibit.

Which option is a valid way to retrieve the account id? (Choose the best answer.)

A.

Add @PathVariable(“id”) String accountId argument to the update() handler method.

B.

Add @PathVariable long accountId argument to the update() handler method.

C.

Add @RequestParam long accountId argument to the update() handler method.

D.

Add @RequestParam(“id”) String accountId argument to the update() handler method.

Which two mechanisms of autowiring a dependency when multiple beans match the dependency's type are correct? (Choose two.)

A.

Use of @Qualifier annotation on the class and @Autowired annotation either on a field or setter methods.

B.

Use of @Qualifier and @Autowired annotations together with setter methods.

C.

Use of @Qualifier annotation only with setter methods (@Autowired is optional for setters).

D.

Use of @Qualifier and @Autowired annotations together on a field.

E.

Use of @Qualifier annotation only on a field (@Autowired is optional for fields).

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

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.

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

A.

Locale

B.

Principal

C.

Language

D.

Session

E.

Request

F.

HttpSession

Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

A.

Java system properties have higher precedence than the properties loaded from

@TestPropertySource.

B.

Properties defined @PropertySource are not loaded if @TestPropertySource is used.

C.

@TestPropertySource annotation loads a properties file relative to the root of the project by default.

D.

Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.

Which two statements are true regarding bean creation? (Choose two.)

A.

A Spring bean can be explicitly created by annotating methods or fields by @Autowired.

B.

A Spring bean can be implicitly created by annotating the class with @Component and using the component-scanner to scan its package.

C.

A Spring bean can be implicitly created by annotating the class with @Bean and using the component- scanner to scan its package.

D.

A Spring bean can be explicitly created using @Bean annotated methods within a Spring configuration class.

E.

A Spring bean can be explicitly created by annotating the class with @Autowired.

Refer to the exhibit.

What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)

A.

clientServiceImpl (starting with lowercase “c”)

B.

clientServiceImpl (starting with uppercase “C”)

C.

clientService (starting with lowercase “c”)

D.

ClientService (starting with uppercase “C”)

If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)

A.

Ensure a valid bean name in the @Component annotation is specified.

B.

Ensure a valid @ComponentScan annotation in the Java configuration is specified.

C.

Ensure a valid @Scope for the class is specified.

D.

Ensure a valid @Bean for the class is specified.

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

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.