MockCertMockCert
Menu

Broadcom conceptsSpring Professional DevelopSpring MVC

2V0-72.22 Spring MVC: what the exam tests

What the Spring Professional Develop exam asks about Spring MVC: request mapping, argument binding, validation, interceptors and REST clients.

By MockCert EditorialPublished Nov 13, 2026

3 min read

A @RequestMapping with no HTTP method matches every method by default. And invalid @RequestBody input becomes a 400 (BAD_REQUEST) response by default.

01 What does the exam test about Spring MVC?

You have built a controller in a tutorial, yet a mock question about reading form data makes you hesitate. That gap between writing code and knowing the defaults is what this domain probes.

Expect questions on mapping requests to controller methods, binding request parameters, and calling REST services from Spring Boot.

What each Spring MVC objective asks

  1. 3.1 Controllers and request handlingMapping annotations, argument binding, validation and interceptors.
  2. 3.2 REST servicesRestTemplate and RestClient in Spring Boot, plus error details in the response body.
Controllers come first; REST clients and error responses build on them.

Split your study between controllers on the server side and REST clients on the calling side.

02 How do controllers map and bind requests?

Start on the server side. @RequestMapping can match by URL, HTTP method, parameters, headers and media types. Without a method it matches all HTTP methods, which is why shortcuts such as @GetMapping exist.

@RequestParam binds query parameters or form data, and its arguments are required by default. Adding @Valid or @Validated to a @RequestBody argument applies Bean Validation.

Where each binding annotation reads from

@PathVariable

  • A captured URI template variable
  • Converted to the argument type

@RequestParam

  • Query parameters or form data
  • Required by default

@RequestBody

  • The request body
  • Read through an HttpMessageConverter
Read form data with @RequestParam; @RequestBody is not reliable for it.

Know where each binding annotation reads from and what it requires by default.

03 What runs around the handler?

Interceptors wrap the handler: if preHandle returns false, the handler is not called. For @ResponseBody and ResponseEntity methods, postHandle runs too late to add a header.

Remember what each interceptor callback can still change.

04 How does Spring Boot help with REST clients and errors?

Then move to the calling side. Spring Boot points imperative code to RestClient or RestTemplate, and reactive WebFlux apps to WebClient. It auto-configures a RestTemplateBuilder, not a single RestTemplate bean.

For error details, return a ProblemDetail from an @ExceptionHandler or @RequestMapping method to render an RFC 9457 response. Then check yourself with quizzes on both objectives before your next mock exam.

Know which client fits your style and what Spring Boot auto-configures for it.

Summary

  1. @RequestMapping without a method matches all HTTP methods; shortcuts like @GetMapping narrow it.
  2. @RequestParam arguments are required unless you make them optional.
  3. Invalid @RequestBody input returns 400 (BAD_REQUEST) by default.
  4. Spring Boot auto-configures a RestTemplateBuilder, not a RestTemplate bean.

Sources

  1. Mapping Requests :: Spring Framework (opens in a new tab)
  2. @RequestParam :: Spring Framework (opens in a new tab)
  3. Calling REST Services :: Spring Boot (opens in a new tab)
  4. @RequestBody :: Spring Framework (opens in a new tab)
  5. Interception :: Spring Framework (opens in a new tab)
  6. Error Responses :: Spring Framework (opens in a new tab)