Mario's Blog
首页
关于
分类
Linux (1)
Redis (1)
正则表达式 (1)
SpringBoot (5)
Java (1)
算法 (6)
全部分类 ( 17 )
查询
当前位于"SpringBoot"分类下
Spring项目使用过滤器和ThreadLocal实现用户态校验与保存
使用拦截器校验用户登录态,满足条件则继续执行控制器逻辑,不满足直接跳到登录页。大多数时候,控制器逻辑需要用到登录信息,这时候可以再从Redis取出登录信息,或者在校验完成后用ThreadLocal保存起来。
SpingBoot
2020年09月28日
185次浏览
SpringBoot使用拦截器
在面向对象编程过程中,我们很容易通过继承、多态来解决纵向扩展,在Spring项目中,使用拦截器可以实现横向扩展。
SpringBoot
拦截器
2020年09月26日
196次浏览
【静态路由与动态路由】resource/static 与 resource/templates
无论怎样使用@RequestMapping映射,路由始终无法令人满意,使用thymeleaf处理动态路由就舒服多了。
SpringBoot
Thymeleaf
2020年09月25日
156次浏览
@ControllerAdvice拦截处理全局异常
在阅读一个开源项目时,发现作者采用@ControllerAdvice将异常的处理全给它拉到一个类里,甚妙!在开始使用前了解下它的来历。
@ControllerAdvice
2020年09月21日
156次浏览
SpringBoot获取URL请求参数的方法
下面为三种获取URL参数的方法通过HttpServletRequest接收/***2、通过HttpServletRequest接收*@paramrequest*@return*/@RequestMapping("/addUser2")publicStringaddUser2(Ht
SpringBoot
Controller
HttpServletRequest
2020年09月10日
86次浏览
«
1
(current)
»
个人信息
mario
辽宁 沈阳
文章数量
17
分类数量
6
标签数量
26
冲冲冲
所有标签
git
1
登录态
0
SpingBoot
1
Mybatis-generator
1
Mybatis
1
拦截器
1
Thymeleaf
1
BinaryTree
1
DFS
1
vim
1
@ControllerAdvice
1
Http
1
Redis
1
剑指Offer
5
迭代
1
二分法
1
递归
3
动态规划
2
斐波那契数列
1
正则表达式
1
Pattern
1
Matcher
1
Reg
0
HttpServletRequest
1
Controller
1
SpringBoot
3
所有标签
17