Spring Certified Professional 2V0-72.22

Practice for the Spring Professional exam

Exam-style questions for all six sections of the official exam guide, each explained option by option.

2,600+
Exam-style questions
130 min
Timed mock exam, 60 questions
14 days
Money-back guarantee
$45
One payment, taxes included

Practice a sample question

See how the explanations work before you buy full access.

Question 1 / 2

Spring Core · medium difficulty

Question 1 of 2

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?

Want more questions?

2,600+ exam-style questions with explanations like these, timed 60-question mock exams and topic quizzes.

Learn Spring
by running it.

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 editor
ProductService.javaRun
12@Transactional
13public void updateProductStock(int productId, int quantity) {
14 String sql = "UPDATE products SET stock = stock - ? WHERE id = ?";
15 jdbcTemplate.update(sql, quantity, productId);
16 if (quantity < 0) {
17 throw new IllegalArgumentException("Quantity cannot be negative");
ConsoleFinished

1Stock 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

Exam topics covered

The six sections of the official 2V0-72.22 exam guide

Latest articles

Free guides to the exam and its topics.

What full access includes

One payment opens the whole question bank and the mock exams.

$45One payment, taxes included, no subscription
Get full access

14-day money-back guarantee: if it isn't for you, email us within 14 days of purchase for a full refund.

From candidates who passed

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

Frequently asked questions

About the exam: preparation time, passing score, Spring versions, retakes, price, vouchers and the certificate.

It depends on your work. The exam checks Spring Core, data access, Spring MVC, security, testing and Spring Boot at the level the official exam guide sets. It helps most if you use Spring every day or want a structured reason to learn it properly. Broadcom's exam guide (last updated 26 January 2024) lists Spring Framework 5.3 and Spring Boot 2.5 as its references, while Spring Academy's FAQ names Spring Boot 2.7 and Spring Framework 5.3. Neither is Spring 6 or Boot 3, so the exam says less about the newest releases.