> [JAVA/Spring Boot] getter interface를 활용해 OCP를 준수한 SapMapper 구현하기
⌨️ 코드 구현@Componentpublic class SapMapper { public SapSendDto toDto(Sales sales){ return new SapSendDto( sales.getAmount(), sales.getPrice() ); } public SapSendDto toDto(Purchase purchase) { return new SapSendDto( purchase.getAmount(), purchase.getPrice() ); }}기존 SapMapper는 Sales와 Purchase 각각에 대해 t..