mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 20:59:29 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -36,9 +36,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.joda.money.Money;
|
||||
|
||||
/**
|
||||
* This class organizes domain logic of customer.
|
||||
* A single instance of this class
|
||||
* contains both the data and behavior of a single customer.
|
||||
* This class organizes domain logic of customer. A single instance of this class contains both the
|
||||
* data and behavior of a single customer.
|
||||
*/
|
||||
@Slf4j
|
||||
@Getter
|
||||
@@ -51,9 +50,7 @@ public class Customer {
|
||||
@NonNull private String name;
|
||||
@NonNull private Money money;
|
||||
|
||||
/**
|
||||
* Save customer or update if customer already exist.
|
||||
*/
|
||||
/** Save customer or update if customer already exist. */
|
||||
public void save() {
|
||||
try {
|
||||
Optional<Customer> customer = customerDao.findByName(name);
|
||||
@@ -117,9 +114,7 @@ public class Customer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print customer's purchases.
|
||||
*/
|
||||
/** Print customer's purchases. */
|
||||
public void showPurchases() {
|
||||
Optional<String> purchasesToShow =
|
||||
purchases.stream()
|
||||
@@ -133,9 +128,7 @@ public class Customer {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print customer's money balance.
|
||||
*/
|
||||
/** Print customer's money balance. */
|
||||
public void showBalance() {
|
||||
LOGGER.info(name + " balance: " + money);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user