Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
注釈付きjaxb Javaクラスでxsdのファセットをどのように指定しますか?
注釈を使用して (xsd からではなく) 文字列を 1 文字のみに制限したいと思います。これは可能ですか?
このユースケースでは、 Bean Validation(JSR-303)の実装を使用できます。これにより、オブジェクトプロパティの注釈またはXMLを介して検証ルールを指定できます。Hibernateはリファレンス実装を実装しました: