nerdexam
Broadcom-VMware

2V0-72.22 · Question #35

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.)

Sign in or unlock 2V0-72.22 to reveal the answer and full explanation for question #35. The question stem and answer options stay visible for context.

Application Deployment and Management

Question

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.)

Options

  • A@ConditionalOnBean(name= "dataSource") should be replaced with @ConditionalOnBean
  • B@ConditionalOnBean(name= "dataSource") should be replaced with
  • CThe @Bean annotation should be removed.
  • DA JdbcTemplate bean will be created when the DataSource class is in the classpath but there
  • EA JdbcTemplate bean will be created when a bean named dataSource has already been

Unlock 2V0-72.22 to see the answer

You've previewed enough free 2V0-72.22 questions. Unlock 2V0-72.22 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#@ConditionalOnBean#JdbcTemplate#DataSource#Spring Boot conditional
Full 2V0-72.22 Practice