Skip to content

Instantly share code, notes, and snippets.

@sohangp
Last active May 16, 2019 01:22
Show Gist options
  • Save sohangp/ac83e444263fdadcad683f6afa4acd67 to your computer and use it in GitHub Desktop.
Save sohangp/ac83e444263fdadcad683f6afa4acd67 to your computer and use it in GitHub Desktop.
Order DTO that will be built with SPEL
@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