Three companion modules verifying and rewriting the Boot 4.1.1 / Framework 7.0.9 story for three older articles: the javax->jakarta.validation namespace fix plus Jakarta Validation 3.1 record-validation clarification, ETag/ conditional-request APIs re-verified unchanged plus the starter rename, and RestTemplate Basic Auth rebuilt on RestClient with the exchange() trap called out. 19 real passing tests generate every transcript quoted from the three companion articles. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EQNA6DJ9VgCtW6zhCE8Xud
13 lines
622 B
Plaintext
13 lines
622 B
Plaintext
$ curl -s -i -X POST localhost:8080/contact-record \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"email":"[email protected]","message":"This is spam."}'
|
|
|
|
HTTP status: 400
|
|
Body: '' (empty!)
|
|
|
|
# The record parameter has no BindingResult to collect field errors into, unlike
|
|
# ContactController#submitContactForm's class-based, BindingResult-carrying signature.
|
|
# A failing constraint throws MethodArgumentNotValidException instead, and Boot 4.1's
|
|
# default handling for it returns an EMPTY body when the request has no Accept header
|
|
# asking for a structured error. See the next transcript for what changes with one.
|