Certbus > VMware > VCP-AM Develop 2022 > 2V0-72.22 > 2V0-72.22 Online Practice Questions and Answers

2V0-72.22 Online Practice Questions and Answers

Questions 4

Which two options are REST principles? (Choose two.)

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.

Browse 60 Q&As
Questions 5

Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)

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.

Browse 60 Q&As
Questions 6

Refer to the exhibit.

Assume that the application is using Spring transaction management which uses Spring AOP internally.

Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)

A. There are 2 transactions because REQUIRES_NEW always runs in a new transaction.

B. An exception is thrown as another transaction cannot be started within an existing transaction.

C. There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.

D. There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.

Browse 60 Q&As
Questions 7

Which statement is true? (Choose the best answer.)

A. @ActiveProfiles is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.

B. @ActiveProfiles is a class-level annotation that you can use to configure how the Spring TestContext Framework is bootstrapped.

C. @ActiveProfiles is a class-level annotation that you can use to configure the locations of properties files and inlined properties to be added to the set of PropertySources in the Environment for an ApplicationContext loaded for an integration test.

D. @ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loaded an ApplicationContext for an integration test.

Browse 60 Q&As
Questions 8

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

A. REST is a Protocol.

B. REST is Stateful.

C. REST is Reliable.

D. REST is Interoperable.

E. REST is Relative.

Browse 60 Q&As
Questions 9

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

A. @Autowired fields are injected after any config methods are invoked.

B. Multiple arguments can be injected into a single method using @Autowired.

C. By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.

D. If @Autowired is used on a class, field injection is automatically performed for all dependencies.

E. @Autowired can be used to inject references into BeanPostProcessor and BeanFactoryPostProcessor.

Browse 60 Q&As
Questions 10

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.

Browse 60 Q&As
Questions 11

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

A. BeanPostProcessors are called before the dependencies have been injected.

B. Custom BeanPostProcessors can be implemented for Spring applications.

C. BeanPostProcessors are called before the BeanFactoryPostProcessors.

D. BeanPostProcessors are called during the initialization phase of a bean life cycle.

E. BeanPostProcessors cannot be ordered in a Spring Boot application.

Browse 60 Q&As
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.)

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.

Browse 60 Q&As
Questions 13

Refer to the exhibit.

Which two statements are correct regarding the HelloAutoConfig auto-configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)

A. A HelloService bean will be created from the helloService() method even if the HelloService.class is not in the classpath.

B. A HelloService bean will be created from the helloService() method only when there is no other HelloService bean in the ApplicationContext.

C. This auto-configuration class is used only when the HelloService.class is not on the classpath.

D. This auto-configuration class is used only when the HelloService.class is on the classpath.

E. A HelloService bean will be created from the helloService() method and will replace existing a HelloService bean in the ApplicationContext.

Browse 60 Q&As
Questions 14

Which statement describes the @AfterReturning advice type? (Choose the best answer.)

A. The advice is invoked only if the method returns successfully but not if it throws an exception.

B. The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.

C. The advice has complete control over the method invocation; it could even prevent the method from being called at all.

D. Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.

Browse 60 Q&As
Questions 15

Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

A. It provides configuration options through which only an authenticated user can display application information.

B. It is not enabled by default.

C. It can be used to display arbitrary application information.

D. It can be used to change a property value on a running application.

E. Typically it is used to display build or source control information.

Browse 60 Q&As
Questions 16

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.

Browse 60 Q&As
Questions 17

What are the two reasons Spring be used to build a Java application? (Choose two.)

A. Spring automates a Java application build.

B. Spring provides a Dependency Injection container.

C. Spring automates deployment of Java applications to all of the major cloud providers.

D. Spring provides comprehensive Java IDE support.

E. Spring provides abstractions over infrastructure such as persistence and messaging.

Browse 60 Q&As
Questions 18

Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)

A. Starts a new transaction but throws an exception if an active transaction already exists.

B. Joins a transaction if one already exists; throws an exception if an active transaction does not exist.

C. Starts a new transaction; if an active transaction already exists, it is suspended.

D. Runs in a nested transaction if an active transaction exists; throws an exception if an active transaction does not exist.

Browse 60 Q&As
Exam Code: 2V0-72.22
Exam Name: Professional Develop VMware Spring
Last Update: Apr 27, 2024
Questions: 60 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99