Free Practice

Spring Professional Sample Questions

5 sample questions from the VMware Spring Professional 2V0-72.22 exam. Each answer includes a detailed explanation.

Spring Coremedium
1 / 5
@Configuration
public class MyConfig {
  @Bean
  public AccountRepository accountRepository() {
    return new JdbcAccountRepository();
  }
  @Bean
  public TransferService transferService() {
    TransferServiceImpl service = new TransferServiceImpl();
    service.setAccountRepository(accountRepository());
    return service;
  }
  @Bean
  public AccountService accountService() {
    return new AccountServiceImpl(accountRepository());
  }
}

Based on the default Spring behavior, how many AccountRepository beans will be instantiated?

Want more questions?

970+ exam-style questions with detailed explanations and a proven study plan.

Free account: 6 topics · 18 questions · no credit card