重定向后台给前台传数据
后台
RedirectAttributes redirectAttributes参数
redirectAttributes.addFlashAttribute("message", "未知账户");
前台themeleaf
<span th:text="${username}"></span>
后台
RedirectAttributes redirectAttributes参数
redirectAttributes.addFlashAttribute("message", "未知账户");
前台themeleaf
<span th:text="${username}"></span>