Bean Validation
Bean Validation 一般
アノテーションの付けられる場所
FIELD(フィールドの値、privateでもOK)
METHOD(メソッドの戻り値)
getterに付与する場合もこれ
CONSTRUCTOR(コンストラクタの戻り値)
PARAMETER(メソッドまたはコンストラクタの引数)
TYPE
ANNOTATION_TYPE
TYPE_USE
制約事項
Static methods are ignored by validation. Putting constraints on a static method is not portable. No other restrictions exist from the perspective of this specification, however it is possible that technologies integrating with method validation impose further restrictions to methods for which a validation shall be applied. For instance certain integration technologies might require that methods to be validated must have public visibility and/or must not be final.
staticメソッドはJSR380としてNG、publicじゃないとダメなのはSpringか
SpringにおけるBean Validation
Java Bean