Exam-style questions for all six sections of the official exam guide, each explained option by option.
See how the explanations work before you buy full access.
Question 1 / 2
Spring Core · medium difficulty
Refer to the code:
@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?
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.
Questions with code open in a real editor. Change the code, press Run and see what Spring actually does, on Java 17 and Spring Boot 2.5. Nothing to install.
See the code editor1Stock before call: 100
2Calling productService.updateProductStock(1, -5)
3[tx] begin demo.ProductService.updateProductStock (REQUIRED)
4[tx] rollback demo.ProductService.updateProductStock
5Caller caught: java.lang.IllegalArgumentException: Quantity cannot be negative
6Stock after call: 100
The six sections of the official 2V0-72.22 exam guide
Free guides to the exam and its topics.
Spring profiles and external properties for the 2V0-72.22 exam — property precedence order, @Value vs @ConfigurationProperties, @Profile, YAML, SpEL and traps.
Master Spring MVC & REST for the 2V0-72.22 exam — DispatcherServlet, @RestController, request mapping, ResponseEntity, content negotiation, and exception handling.
Master @Transactional for the VMware Spring Professional exam — propagation, isolation, rollback rules, self-invocation, and proxy gotchas with code examples.
One payment opens the whole question bank and the mock exams.
14-day money-back guarantee: if it isn't for you, email us within 14 days of purchase for a full refund.
Reviews from students who prepared with SpringCertified.
“I passed the exam with a score of 465/500. If you're wondering whether this is worth it: absolutely, 100% yes.”
— Danny
“The questions are very close to the real exam and the explanations are clear and helpful. It really helped me prepare for the Spring certification. Highly recommend.”
— Cameron
“The huge number of questions was impressive and the quality of explanations outstanding. I passed the exam effortlessly and achieved a superb score. The best preparation for the exam.”
— Katarzyna
“Studying the failed practice test questions last few days did the trick and I easily passed the actual exam today. The exam did not mostly focus on the basics but rather the particulars of things (like your practice exam does). Money well spent!!”
— James
About the exam: preparation time, passing score, Spring versions, retakes, price, vouchers and the certificate.