重定向到 Thymeleaf 中的登录页面后显示警报信息

问题描述

我在 Spring Boot 中有一个应用程序。

我想在从注册页面重定向登录页面后创建一个注册成功”警报,但我不知道如何在登录页面上创建警报信息。

我已经收到 2 条关于注销和错误的消息:

<!-- error message -->
<div th:if="${param.error}">
    <div class="alert alert-danger">wrong email or password</div>
</div>

<!-- logout message -->
<div th:if="${param.logout}">
    <div class="alert alert-info">logout</div>
</div>

例如我想在注册后进入登录页面

return "redirect:/Login?success";

得到这个:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)