* add hexagonal architecture example project * rename class * add unit test and integration test * add new line * reorder pom * remove maven wrapper * [BAEL-5649] add article code * remove files added by mistake * get parameter type using reflection and serioalize JSON into POJOs * clean code * clean code * reformat * implement PR feedback * reformat with contiunation space eq to 2 * replace UserDto with firstName and lastName
47 lines
1015 B
Java
47 lines
1015 B
Java
package com.baeldung.jsonargs;
|
|
|
|
public class UserDto {
|
|
|
|
private String firstName;
|
|
private String lastName;
|
|
private String age;
|
|
private AddressDto address;
|
|
|
|
public String getFirstName() {
|
|
return firstName;
|
|
}
|
|
|
|
public void setFirstName(String firstName) {
|
|
this.firstName = firstName;
|
|
}
|
|
|
|
public String getLastName() {
|
|
return lastName;
|
|
}
|
|
|
|
public void setLastName(String lastName) {
|
|
this.lastName = lastName;
|
|
}
|
|
|
|
public String getAge() {
|
|
return age;
|
|
}
|
|
|
|
public void setAge(String age) {
|
|
this.age = age;
|
|
}
|
|
|
|
public AddressDto getAddress() {
|
|
return address;
|
|
}
|
|
|
|
public void setAddress(AddressDto address) {
|
|
this.address = address;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "User{" + "firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", age='" + age + '\'' + ", address=" + address + '}';
|
|
}
|
|
}
|