Skip to content
Sharp

Spring Core · interview question

Which Spring annotation would you use to indicate a boundary for serialization in a DTO?

Multiple choiceMediumchapter-9-curatedpremiumspring-coredtos-and-entities
Choose one answer
Answer and explanation

Correct answer

A. @JsonIgnore

Why

@JsonIgnore is used to prevent a field from being serialized, helping to define serialization boundaries and protect sensitive information.

Test yourself on Spring Core

A free test with instant, explained results. No account needed.

Start free test
All Spring Core questions →