New (2022) VMware 2V0-72.22 Exam Dumps
Best Way To Study For VMware 2V0-72.22 Exam Brilliant 2V0-72.22 Exam Questions PDF
NEW QUESTION 30
Which two statements are true about REST? (Choose two.)
- A. REST is Reliable.
- B. REST is a Protocol.
- C. REST is Relative.
- D. REST is Interoperable.
- E. REST is Stateful.
Answer: B,D
NEW QUESTION 31
Which statement about @TestPropertySource annotation is true? (Choose the best answer.)
- A. Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.
- B. Properties defined @PropertySource are not loaded if @TestPropertySource is used.
- C. Java system properties have higher precedence than the properties loaded from
@TestPropertySource. - D. @TestPropertySource annotation loads a properties file relative to the root of the project by default.
Answer: A
NEW QUESTION 32
Which two statements are true regarding Spring Security? (Choose two.)
- A. A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.
- B. Access control can be configured at the method level.
- C. It provides a strict implementation of the Java EE Security specification.
- D. Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.
- E. In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.
Answer: B,E
NEW QUESTION 33
Which two statements are true regarding the RestTemplate class? (Choose two.)
- A. It provides convenience methods for writing REST clients.
- B. It provides convenience methods for writing REST services.
- C. It automatically supports sending and receiving Java objects.
- D. It supports asynchronous non-blocking model.
- E. Sending an HTTP request with a custom header is not possible when using RestTemplate.
Answer: C,E
NEW QUESTION 34
Which two statements are true about @Controller annotated classes? (Choose two.)
- A. The @Controller annotation is a stereotype annotation like @Component.
- B. The classes are eligible for handling requests in Spring MVC.
- C. @Controller is interchangeable with @RestController with no extra code changes for the methods inside the class.
- D. The @Controller annotated classes can only render views.
- E. The classes must be annotated together with @EnableMvcMappings to be discovered via component scanning.
Answer: A,B
NEW QUESTION 35
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 @ComponentScan annotation in the Java configuration is specified.
- B. Ensure a valid @Bean for the class is specified.
- C. Ensure a valid bean name in the @Component annotation is specified.
- D. Ensure a valid @Scope for the class is specified.
Answer: C
NEW QUESTION 36
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)
- A. A metric must be created with one or more tags.
- B. The metrics endpoint /actuator/metrics is exposed over HTTP by default.
- C. Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.
- D. An external monitoring system must be used with Actuator.
- E. Timer measures both the number of timed events and the total time of all events timed.
Answer: B,D
NEW QUESTION 37
Refer to the exhibit.
How can a response status code be set for No Content (204)? (Choose the best answer.)
- A. The update() handler method cannot return a void type, it must return a ResponseEntity type.
- B. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
- C. Annotate the update() handler method with @ResponseEntity(204).
- D. Annotate the update() handler method with @PutMapping("/store/orders/{id"}", HttpStatus.NO_CONTENT).
Answer: C
NEW QUESTION 38
What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)
- A. GoogleCloudDataStoreHealthIndicator
- B. RabbitHealthIndicator
- C. DynamoDBHealthIndicator
- D. OktaHealthIndicator
- E. DataSourceHealthIndicator
Answer: B,E
NEW QUESTION 39
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 comprehensive Java IDE support.
- C. Spring provides abstractions over infrastructure such as persistence and messaging.
- D. Spring provides a Dependency Injection container.
- E. Spring automates deployment of Java applications to all of the major cloud providers.
Answer: A,D
NEW QUESTION 40
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. Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.
- C. The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.
- D. The advice has complete control over the method invocation; it could even prevent the method from being called at all.
Answer: A
NEW QUESTION 41
Which statement is true? (Choose the best answer.)
- A. @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.
- 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 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.
- 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.
Answer: D
NEW QUESTION 42
Refer to the exhibit.
The above code shows a conditional @Bean method for the creation of a JdbcTemplate bean. Which two statements correctly describe the code behavior? (Choose two.)
- A. A JdbcTemplate bean will be created when the DataSource class is in the classpath but there is no DataSource bean.
- B. A JdbcTemplate bean will be created when a bean named dataSource has already been created.
- C. @ConditionalOnBean(name= "dataSource") should be replaced with @ConditionalOnBean (DataSource.class) for greater flexibility.
- D. @ConditionalOnBean(name= "dataSource") should be replaced with
@ConditionalOnMissingBean (DataSource.class) for greater flexibility. - E. The @Bean annotation should be removed.
Answer: A,C
NEW QUESTION 43
Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)
- A. @Transactional(commit=true)
- B. @Commit
- C. @Sql(alwaysCommit=true)
- D. @SqlMergeMode(false)
- E. @Rollback(false)
Answer: B,E
NEW QUESTION 44
Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)
- A. Auto-configuration could apply when a bean is present but not when a bean is missing.
- B. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.
- C. Auto-configuration uses @Conditional annotations to constrain when it should apply.
- D. Auto-configuration is applied before user-defined beans have been registered.
- E. Auto-configuration could apply when a bean is missing but not when a bean is present.
Answer: A,D
NEW QUESTION 45
Refer to the exhibit.
What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)
- A. clientService (starting with lowercase "c")
- B. clientServiceImpl (starting with lowercase "c")
- C. ClientService (starting with uppercase "C")
- D. clientServiceImpl (starting with uppercase "C")
Answer: C
NEW QUESTION 46
Refer to the exhibit.
Which statement is true? (Choose the best answer.)
- A. A class that implements CustomerRepository must be implemented and declared as a Spring Bean.
- B. An implementation of this repository can be automatically generated by Spring Data JPA.
- C. JPA annotations are required on the Customer class to successfully use Spring Data JDBC.
- D. CustomerRepository should be a class, not an interface.
Answer: B
NEW QUESTION 47
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. Mocking a Spring Bean requires annotating it with @Mock annotation.
- C. If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
- D. Mocks cannot be used in a Spring Boot web slice test.
Answer: A
NEW QUESTION 48
......
Updated Verified Pass 2V0-72.22 Exam - Real Questions and Answers: https://pass4sure.test4cram.com/2V0-72.22_real-exam-dumps.html