用thymeleaf的th:each双重循环遍历不出来
@Controller
@RequestMapping("/admin")
public class AdminController {
@Autowired
private VideoServiceImpl videoServiceimpl;
@Autowired
private TypeServiceImpl typeServiceimpl;
@GetMapping(value = {"","/index"})
public String index(HttpServletRequest request){
List
public class Video {
private int id;
private String topic;
private String path;
private Date created;
private int typeId;
private List<Type> types=new ArrayList<Type>();
<div th:each="video:${videos}">
<span th:text="${video.topic}">视频标题</span>
<span th:text="${video.created}">视频创建时间</span>
<div th:each="type:${video.types}"><span th:text="${type.name}">视频的分类</span></div>
</div>
为什么页面显示不出来