@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface Desensitize
Starting from the specified position, change the specified size of characters to mask characters.
eg:
\@Desensitize(start=5, size=2, mask="*")
private String sequence;
sequence in the database is: 0123456789
after process:
sequence=01234**789
V2.0
\@Desensitize(start=0, size=-1, mask="*") //replace all
\@Desensitize(start=2, size=-1, mask="*") //replace from 2 to end
- Since:
- 1.11
- Author:
- Kingstar