Код: Выделить всё
class GroupOrderCustomer {
private String customerName;
private double totalPrice;
private List orderProducts;
}
Я также добавляю Group Ordercust
. />
Код: Выделить всё
Context context = new Context(locale);
context.setVariable("groupOrderCustomers", groupOrderCustomers);
final String groupOrderConfirmationTemplate = "html/groupOrderConfirmation";
String htmlContent = emailTemplateEngine.process(groupOrderConfirmationTemplate, context);
helper.setText(htmlContent, true);
< /code>
При попытке отправить электронное письмо, я получаю это в мою консоли, < /p>
Exception evaluating SpringEL expression: "groupOrderCustomer.orderProducts"
EL1007E: Property or field 'orderProducts' cannot be found on null
< /code>
Это моя электронная почта, < /p>
Martin
100 kr
1st Kombo
100 kr
. Комментируя второе: каждый .
.>
Подробнее здесь: https://stackoverflow.com/questions/737 ... le-in-each