Fix jackson issue
This commit is contained in:
committed by
Marcus Hert Da Coregio
parent
80156feb61
commit
fe4be0c66a
@@ -18,6 +18,7 @@ package example;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* A custom user representation.
|
||||
@@ -34,7 +35,8 @@ public class CustomUser {
|
||||
private final String password;
|
||||
|
||||
@JsonCreator
|
||||
public CustomUser(long id, String email, String password) {
|
||||
public CustomUser(@JsonProperty("id") long id, @JsonProperty("email") String email,
|
||||
@JsonProperty("password") String password) {
|
||||
this.id = id;
|
||||
this.email = email;
|
||||
this.password = password;
|
||||
|
||||
Reference in New Issue
Block a user