Spring Professional sample questions
5 free exam-style questions for the Spring Certified Professional exam (2V0-72.22), organized by the topics of the official exam guide. They are not the real exam questions, which are confidential. Every option is explained, with links to the Spring docs.
Independent · not affiliated with Broadcom or VMware · every question can be reported
Question 1 / 5
Spring Core · medium difficulty
Question 1 of 5
Based on the default Spring behavior, how many AccountRepository beans will this configuration instantiate?
@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());
}
}A–D choose · Enter check
Want more questions?
2,600+ exam-style questions with explanations like these, timed 60-question mock exams and topic quizzes.