𝑺𝒕𝒖𝒅𝒚/디자인 패턴

> [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..
READ MORE >> COMMENTS:

> getter interface_

총 1개의 글

> SEARCH: