zoukankan      html  css  js  c++  java
  • SpringBoot学习笔记四之后台登录页面的实现

    注:图片如果损坏,点击文章链接:

    https://www.toutiao.com/i6803542216150090252/

    继续之前完成的内容,首先创建一个常量类

    SpringBoot学习笔记四之后台登录页面的实现

     

    常量类的内容

    SpringBoot学习笔记四之后台登录页面的实现

     

    服务器端渲染

    SpringBoot学习笔记四之后台登录页面的实现

     

    前后端分离

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成后台管理登录页面

    进入前端静态资源

    SpringBoot学习笔记四之后台登录页面的实现

     

    创建后台管理员登录页面admin-login.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成内容

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    然后完成页面跳转

    配置mvc:view-controller

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成配置

    SpringBoot学习笔记四之后台登录页面的实现

     

    启动服务访问一下

    localhost:8080/learn-admin-webui/admin/to/login/page.html
    SpringBoot学习笔记四之后台登录页面的实现

     

    修饰system-error.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    Md5加密工具方法

    添加到类

    SpringBoot学习笔记四之后台登录页面的实现

     

    编写代码

    SpringBoot学习笔记四之后台登录页面的实现

     

    接着

    SpringBoot学习笔记四之后台登录页面的实现

     

    测试下

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    自定义异常

    创建异常类

    SpringBoot学习笔记四之后台登录页面的实现

     

    登录失败后抛出的异常

    SpringBoot学习笔记四之后台登录页面的实现

     

    用户没有登录就访问受保护资源时抛出的异常

    SpringBoot学习笔记四之后台登录页面的实现

     

    在异常处理器中增加登录失败的异常

    SpringBoot学习笔记四之后台登录页面的实现

     

    页面显示错误的地方

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成AdminHandler

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成登录方法

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成adminService.getAdminByLoginAcct

    SpringBoot学习笔记四之后台登录页面的实现

     

    选择方法ctrl+1

    SpringBoot学习笔记四之后台登录页面的实现

     

    会自动在接口中写好,补好注释

    SpringBoot学习笔记四之后台登录页面的实现

     

    在按ctrl+t,弹出菜单

    SpringBoot学习笔记四之后台登录页面的实现

     

    进入实现类后,按ctrl+!加入未实现的方法

    SpringBoot学习笔记四之后台登录页面的实现

     

    按ctrl+o(字母),定位到我们使用的方法

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成方法体

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    重定向到主页面

    redirect:/admin/to/main/page.html
    SpringBoot学习笔记四之后台登录页面的实现

     

    创建admin-main.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    编写内容

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    在spring-web-mvc.xml中完成mvc:view-controller

    SpringBoot学习笔记四之后台登录页面的实现

     

    其中这三个页面我们完成以下

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    页面代码

    Include-head.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    Include-nav.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    Include-sidebar.jsp

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    退出登录

    SpringBoot学习笔记四之后台登录页面的实现

     

    页面对应的点击位置

    SpringBoot学习笔记四之后台登录页面的实现

     

    登录检查

    SpringBoot学习笔记四之后台登录页面的实现

     

    创建拦截器类

    SpringBoot学习笔记四之后台登录页面的实现

     

    完成代码

    SpringBoot学习笔记四之后台登录页面的实现

     

    注册拦截器,配置文件spring-web-mvc.xml

    SpringBoot学习笔记四之后台登录页面的实现

     

    测试下

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现

     

    SpringBoot学习笔记四之后台登录页面的实现
  • 相关阅读:
    Stars in Your Window POJ
    Adding New Machine ZOJ
    洛谷 P3400 仓鼠窝
    django启动时报错:Apps aren't loaded yet.
    netstat命令简单使用
    iostat命令简单使用
    linux下查找指定时间内修改过的或新建的文件
    nginx学习之压缩解压篇(七)
    nginx学习之反向代理篇(六)
    nginx学习之静态内容篇(五)
  • 原文地址:https://www.cnblogs.com/bqwzy/p/12570807.html
Copyright © 2011-2022 走看看