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.
resteasy-jettison でカスタム TypeConverter を提供する方法はありますか? デフォルトでは、数値のみが含まれている場合、jettison parse String 値を int に変換します...変更する必要があります。
クリーンなジェティソンでは、TypeConverter の独自の実装を作成する可能性があります (ジェティソンのユーザー ガイドに記載されています ... しかし、そのようなクラスでジェティソンの構成をどこで更新できるかわかりません。
システム プロパティを以下のクラスに設定します。
System.setProperty("jettison.mapped.typeconverter.class", "org.codehaus.jettison.mapped.SimpleConverter");
したがって、投棄には、値を常に文字列として出力する単純なコンバーターがあります。