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.
私のビーンはセッターを正しく使用してプロパティを目的の値に設定しますが、プロパティを使用するメソッドに入り、自動的に 0 に設定されます。0 がどこから来ているのかさえわかりません。デバッグでは、セッターからメソッドに直接ジャンプするため、その間に何も起こっていません。
Bean は、@SessionScoped何らかの関係がある場合にアノテーションを使用します。
@SessionScoped
プライベート int ベンダー番号
int、boolean、などのJava プリミティブにlongは、固定のデフォルト値があります。
int
boolean
long
Integer、Boolean、などの代わりにラッパー オブジェクトを使用しますLong。彼らはすることができますnull。
Integer
Boolean
Long
null
private Integer vendorno;