@Target(value=FIELD) @Retention(value=RUNTIME) public @interface Dict
data in Databsee:
flag=null
flag=1
flag=0
flag=
@ Dict(map="0=No,1=Yes",nullToValue="?")
@ Dict(map="0=No,1=Yes,=empty,",nullToValue="?")
private String flag;
after process:
flag=?
flag=Yes
flag=No
flag=empty
| Modifier and Type | Required Element and Description |
|---|---|
String |
map |
| Modifier and Type | Optional Element and Description |
|---|---|
String |
nullToValue
The value of the replacement when the field value is null.
|
Copyright © 2022. All rights reserved.