我是个新手。
Classroom
Student
:每个教室包含一个
List<Student>
我可以有一个教室列表:
List<Classroom>
for(int i = 0; i < classroomList.size(); i++){
System.out.println(classroomList.get(i).getRoomName());
for(int x = 0; x < studentList.size(); x++){
System.out.println(studentList.get(x));
}
}
{classroom1{joe1,joe2}, classroom2{joe3}}...
但是我需要能够用Thymeleaf在HTML中完成这项工作(通过传递一个教室列表),这样我才能使它看起来很漂亮。
非常感谢您的帮助。谢谢!