Last active
May 16, 2019 01:22
-
-
Save sohangp/ac83e444263fdadcad683f6afa4acd67 to your computer and use it in GitHub Desktop.
Order DTO that will be built with SPEL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class MapperUtility { | |
public OrderDTO buildOrderDTO(Long orderNumber, Double totalAmount) { | |
OrderDTO order = new OrderDTO(); | |
order.setOrderNumber(orderNumber); | |
order.setTotalAmount("$" + totalAmount); | |
return order; | |
} | |
} | |
public class OrderDTO { | |
private Long orderNumber; | |
private String totalAmount; | |
// Getters and Setter | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment