Код: Выделить всё
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PatientDto {
private String nationalId;
private String firstName;
private String lastName;
private List
phones;
}
Код: Выделить всё
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Phone {
private String phoneNumber;
}
Код: Выделить всё
Save
Код: Выделить всё
@GetMapping
public String getReceptionView(Model model){
PatientDto patientDto = new PatientDto();
model.addAttribute("patientDto", patientDto);
return "reception";
}
@PostMapping("/reception/savePatient")
public String savePatient(@ModelAttribute("patientDto") PatientDto patientDto){
System.out.println("???????????? reception>>> " + patientDto.toString());
return "reception";
}
Каковы будут значения поля «th:field» этих двух телефонных номеров?
Я ценю вашу помощь
Подробнее здесь: https://stackoverflow.com/questions/785 ... spring-mvc
Мобильная версия