ExamGecko
Home Home / VMware / 2V0-72.22

VMware 2V0-72.22 Practice Test - Questions Answers, Page 3

Question list
Search
Search

Which two statements are true about REST? (Choose two.)

A.
REST is a Protocol.
A.
REST is a Protocol.
Answers
B.
REST is Stateful.
B.
REST is Stateful.
Answers
C.
REST is Reliable.
C.
REST is Reliable.
Answers
D.
REST is Interoperable.
D.
REST is Interoperable.
Answers
E.
REST is Relative.
E.
REST is Relative.
Answers
Suggested answer: A, D

Explanation:

Reference: https://www.tutorialspoint.com/restful/restful_introduction.htm

Spring Boot will find and load property files in which of the following? (Choose the best answer.)

A.
A *.properties file matching the name of the class annotated with @SpringBootApplication.
A.
A *.properties file matching the name of the class annotated with @SpringBootApplication.
Answers
B.
config.properties or config.yml, usually located in the classpath root.
B.
config.properties or config.yml, usually located in the classpath root.
Answers
C.
application.properties or application.yml, usually located in the classpath root.
C.
application.properties or application.yml, usually located in the classpath root.
Answers
D.
env.properties or env.yml, usually located in the classpath root.
D.
env.properties or env.yml, usually located in the classpath root.
Answers
Suggested answer: C

Explanation:

Reference: https://stackabuse.com/how-to-access-property-file-values-in-spring-boot/

Which three dependencies are provided by the spring-boot-starter-test? (Choose three.)

A.
Cucumber
A.
Cucumber
Answers
B.
Hamcrest
B.
Hamcrest
Answers
C.
spring-test
C.
spring-test
Answers
D.
Junit
D.
Junit
Answers
E.
EasyMock
E.
EasyMock
Answers
F.
PowerMock
F.
PowerMock
Answers
Suggested answer: B, D, E

Explanation:

Reference: https://www.baeldung.com/spring-boot-testing

Which two statements are correct regarding Spring Boot auto-configuration customization? (Choose two.)

A.
Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration in a specific order.
A.
Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration in a specific order.
Answers
B.
Disable specific auto-configuration classes by using the exclude attribute on the @EnableAutoConfiguation annotation.
B.
Disable specific auto-configuration classes by using the exclude attribute on the @EnableAutoConfiguation annotation.
Answers
C.
Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.
C.
Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.
Answers
D.
Enable component scanning within auto-configuration classes to find necessary components.
D.
Enable component scanning within auto-configuration classes to find necessary components.
Answers
E.
Control the order of auto-configuration classes applied with @AutoConfigureOrder.
E.
Control the order of auto-configuration classes applied with @AutoConfigureOrder.
Answers
Suggested answer: A, B

Explanation:

Reference: https://docs.spring.io/spring-boot/docs/1.4.3.RELEASE/reference/html/using-boot-autoconfiguration.html

Which two statements about the @Autowired annotation are true? (Choose two.)

A.
@Autowired fields are injected after any config methods are invoked.
A.
@Autowired fields are injected after any config methods are invoked.
Answers
B.
Multiple arguments can be injected into a single method using @Autowired.
B.
Multiple arguments can be injected into a single method using @Autowired.
Answers
C.
By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.
C.
By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.
Answers
D.
If @Autowired is used on a class, field injection is automatically performed for all dependencies.
D.
If @Autowired is used on a class, field injection is automatically performed for all dependencies.
Answers
E.
@Autowired can be used to inject references into BeanPostProcessor and BeanFactoryPostProcessor.
E.
@Autowired can be used to inject references into BeanPostProcessor and BeanFactoryPostProcessor.
Answers
Suggested answer: B, E

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

A.
It is a meta-annotation on the @SpringBootApplication composed annotation.
A.
It is a meta-annotation on the @SpringBootApplication composed annotation.
Answers
B.
It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.
B.
It enables auto-configuration of the ApplicationContext by attempting to guess necessary beans.
Answers
C.
It is meta-annotation on the @SpringBootConfiguration composed annotation.
C.
It is meta-annotation on the @SpringBootConfiguration composed annotation.
Answers
D.
It has the same effect regardless of the package of the class that is annotated with it.
D.
It has the same effect regardless of the package of the class that is annotated with it.
Answers
E.
It ensures auto-configuration is applied before user-defined beans have been registered.
E.
It ensures auto-configuration is applied before user-defined beans have been registered.
Answers
Suggested answer: A, D

Explanation:

Reference: https://docs.spring.io/springboot/docs/current/api/org/springframework/boot/autoconfigure/EnableAutoConfiguration.html

Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

A.
BeanPostProcessors are called before the dependencies have been injected.
A.
BeanPostProcessors are called before the dependencies have been injected.
Answers
B.
Custom BeanPostProcessors can be implemented for Spring applications.
B.
Custom BeanPostProcessors can be implemented for Spring applications.
Answers
C.
BeanPostProcessors are called before the BeanFactoryPostProcessors.
C.
BeanPostProcessors are called before the BeanFactoryPostProcessors.
Answers
D.
BeanPostProcessors are called during the initialization phase of a bean life cycle.
D.
BeanPostProcessors are called during the initialization phase of a bean life cycle.
Answers
E.
BeanPostProcessors cannot be ordered in a Spring Boot application.
E.
BeanPostProcessors cannot be ordered in a Spring Boot application.
Answers
Suggested answer: B, D

Explanation:

Reference: https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s07.html

Which two statements are true about @Controller annotated classes? (Choose two.)

A.
The @Controller annotated classes can only render views.
A.
The @Controller annotated classes can only render views.
Answers
B.
The classes are eligible for handling requests in Spring MVC.
B.
The classes are eligible for handling requests in Spring MVC.
Answers
C.
The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.
C.
The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.
Answers
D.
@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.
D.
@Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.
Answers
E.
The @Controller annotation is a stereotype annotation like @Component.
E.
The @Controller annotation is a stereotype annotation like @Component.
Answers
Suggested answer: B, E

Explanation:

Reference: https://www.baeldung.com/spring-mvc-handler-adapters

https://www.dineshonjava.com/stereotype-annotations-in-spring/

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

A.
Locale
A.
Locale
Answers
B.
Principal
B.
Principal
Answers
C.
Language
C.
Language
Answers
D.
Session
D.
Session
Answers
E.
Request
E.
Request
Answers
F.
HttpSession
F.
HttpSession
Answers
Suggested answer: A, E, F

Explanation:

Reference: https://docs.spring.io/spring-framework/docs/3.0.0.M4/spring-framework-reference/html/ch15s03.html

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

A.
Dependency injection can make code easier to trace because it couples behavior with construction.
A.
Dependency injection can make code easier to trace because it couples behavior with construction.
Answers
B.
Dependency injection reduces the start-up time of an application.
B.
Dependency injection reduces the start-up time of an application.
Answers
C.
Dependencies between application components can be managed external to the components.
C.
Dependencies between application components can be managed external to the components.
Answers
D.
Configuration can be externalized and centralized in a small set of files.
D.
Configuration can be externalized and centralized in a small set of files.
Answers
E.
Dependency injection creates tight coupling between components.
E.
Dependency injection creates tight coupling between components.
Answers
F.
Dependency injection facilitates loose coupling between components.
F.
Dependency injection facilitates loose coupling between components.
Answers
Suggested answer: B, D, E

Explanation:

Reference: https://raviroza.com/tight-coupling-and-loose-coupling-in-spring-framework/

Total 60 questions
Go to page: of 6