VMware 2V0-72.22 Exam Practice Questions (P. 4)
- Full Access (90 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #16
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.)

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@ConditionalOnBean(name= “dataSource”) should be replaced with @ConditionalOnBean (DataSource.class) for greater flexibility.Most Voted
- B@ConditionalOnBean(name= “dataSource”) should be replaced with @ConditionalOnMissingBean (DataSource.class) for greater flexibility.
- CThe @Bean annotation should be removed.
- DA JdbcTemplate bean will be created when the DataSource class is in the classpath but there is no DataSource bean.
- EA JdbcTemplate bean will be created when a bean named dataSource has already been created.Most Voted
Correct Answer:
AD
AD
send
light_mode
delete
Question #17
What is a Spring Boot starter dependency? (Choose the best answer.)
- AA setting for specifying which code you want Spring Boot to generate for you.
- BA specific POM which you must build to control Spring Boot’s opinionated runtime.
- CA pre-existing model project you can download and use as the basis of your project.
- DAn easy way to include multiple, coordinated dependencies related to a specific technology, like web or JDBC.Most Voted
Correct Answer:
D
D
send
light_mode
delete
Question #18
Which two are required to use transactions in Spring? (Choose two.)
- AAdd @EnableTransactionManagement to a Java configuration class.Most Voted
- BAnnotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.Most Voted
- CA class must be annotated with @Service and @Transaction.
- DA class requiring a transaction must implement the TransactionInterceptor interface.
- EWrite a Spring AOP advice to implement transactional behavior.
Correct Answer:
AB
AB
send
light_mode
delete
Question #19
Which two statements are true regarding the RestTemplate class? (Choose two.)
- AIt supports asynchronous non-blocking model.
- BIt automatically supports sending and receiving Java objects.Most Voted
- CIt provides convenience methods for writing REST clients.Most Voted
- DIt provides convenience methods for writing REST services.
- ESending an HTTP request with a custom header is not possible when using RestTemplate.
Correct Answer:
BE
BE
send
light_mode
delete
Question #20
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.Most Voted
Correct Answer:
D
D
send
light_mode
delete
All Pages