* 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
This commit is contained in:
Viktor Ardelean
2022-09-17 20:30:26 +03:00
committed by GitHub
parent 16c0f5d5e5
commit a3a3aea698
8 changed files with 274 additions and 3 deletions

View File

@@ -0,0 +1,46 @@
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 + '}';
}
}