摘要: Ctrl+F12 查看此类的方法,关系有哪些 必须继承这HandlerInterceptor 这个类 类中有三个方法 public class LoginIntercepter implements HandlerInterceptor { @Override public boolean preH 阅读全文
posted @ 2021-06-29 20:20 YuyuFishSmile 阅读(91) 评论(0) 推荐(0)
摘要: 对于表单页面也说,F5相当于是再次重复提交表单信息到服务器,此时可以通过重定向来解决 @PostMapping("/login") public String main(String username,String password) { //登陆成功重定向到main.html ,防止表单重复提交 阅读全文
posted @ 2021-06-29 16:53 YuyuFishSmile 阅读(861) 评论(0) 推荐(0)
摘要: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> 引入thyme leaf starter spr 阅读全文
posted @ 2021-06-29 16:36 YuyuFishSmile 阅读(111) 评论(0) 推荐(0)
摘要: @GetMapping("/send") public String getmessage(HttpServletRequest request) { request.setAttribute("msg","跳转"); //设置参数 request.setAttribute("code",123); 阅读全文
posted @ 2021-06-29 12:32 YuyuFishSmile 阅读(451) 评论(0) 推荐(0)