IdToEntityConverter
is an internal Spring class. It's non-public, which is why it doesn't appear in the javadoc, but it's registered by default in every context. The class comment says:
Converts an entity identifier to a
entity reference by calling a static
finder method on the target entity
type.
For this converter to match, the
finder method must be public, static,
have the signature
find[EntityName]([IdType])
, and
return an instance of the desired
entity type.
So if you're trying to bind entity class X
, then X
must have a public static findX(id)
, or something similar, on class X
.