April 2018
Intermediate to advanced
382 pages
10h 11m
English
So we split the monolith into three projects (microservices): the user service, the user address service, and the gateway service.
The user service classes remained unchanged after the migration from the monolith version. So there's nothing to comment on.
The UserAddress class had to be changed to become a microservice. The first change was made on the entity.
Here is the monolith version:
@Entitypublic class UserAddress implements Serializable { ... @Column @ManyToOne private User user; ... public UserAddress(User user, String street, String number, String city, String zip) { this.user = user; this.street = street; this.number = number; this.city = city; this.zip = zip; } ... public User getUser() { return user; } public ...Read now
Unlock full access