VMware 2V0-72.22 Professional Develop VMware Spring Exam Practice Test

Page: 1 / 14
Total 79 questions
Question 1

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



Answer : A, D


Question 2

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



Answer : A, B

A . @Configuration This annotation indicates that the class has @Bean definition methods and may be processed by the Spring container to generate bean definitions and service requests for those beans at runtime. B. @ComponentScan This annotation configures component scanning directives for use with @Configuration classes. Provides support parallel with Spring XML's context:component-scan element.


Question 3

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



Answer : A, D


Question 4

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



Answer : B


Question 5

Refer to the exhibit.

AppConfig is a Java configuration class. Which two statements are true? (Choose two.)



Answer : D, E


Question 6

Which two options are valid optional attributes for Spring's @Transactional annotation? (Choose two.)



Answer : A, E

https://www.baeldung.com/transaction-configuration-with-jpa-and-spring

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/Transactional.html


Question 7

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



Answer : D

This is true because the @PropertySource annotation provides a convenient and declarative mechanism for adding a PropertySource to Spring's Environment. A PropertySource is an abstraction for a source of name/value pairs that can be used by the Environment to resolve properties. The @PropertySource annotation can be used to load properties from an external file, such as a .properties or .yml file, and make them available to the application context.

https://docs.spring.io/spring-framework/reference/core/beans/environment.html#beans-using-propertysource


Page:    1 / 14   
Total 79 questions