There is a class Person, which contains a field type Set addresses. How to display information on Addresses?
The information on Person is displayed as follows:
<div> <p th:each="person : ${persons}" th:text="${person.id} + '. ' + ${person.lastName} + ' ' + ${person.firstName} + ' ' + ${person.patronymic} + '. Тел.: ' + ${person.addresses}"></p> </div> Address class:
@Embeddable public class Address { @NotNull @Size(max = 100) private String addressLine1; @NotNull @Size(max = 100) private String addressLine2; @NotNull @Size(max = 100) private String city; @NotNull @Size private String region; @NotNull @Size private String country; @NotNull @Size private String zipCode; public Address() { } public Address(@NotNull @Size(max = 100) String addressLine1, @NotNull @Size(max = 100) String addressLine2, @NotNull @Size(max = 100) String city, @NotNull @Size String region, @NotNull @Size String country, @NotNull @Size String zipCode) { this.addressLine1 = addressLine1; this.addressLine2 = addressLine2; this.city = city; this.region = region; this.country = country; this.zipCode = zipCode; }