GithubHelp home page GithubHelp logo

login_part's Introduction

Design_part 使用handler实现用户的权限登录 运用Spring Boot+mybatis 运用jdk动态代理,即java spring的AOP原理实现用户权限。 几张数据库表如下: uer: id name password salt headurl ticket表: id userid ticket expires status

User Dao: 分析用户就查找,更新,insert 操作然后写入相应的@insert sql语句。 ticket Dao 考虑到用户设置过期时间,所以要一个更新操作,产生用户ticket的insert操作 Ticket 字符串是存在与cookies里面的,到时候用 HttpServletResponse response 就可将带有ticket的cookie 加入到浏览器cookie中 权限登录: 继承的是HandlerInterceptor,实现三个方法。 咱们用hostholder即一个localthread来储存一个用户。这样这个用户的状态就被记录下来了。之后可以调用这个用户来实现 权限登陆

login_part's People

Contributors

wuweijieqity avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.