当前位置:网站首页>【Utils】ServletUtil
【Utils】ServletUtil
2022-07-28 14:10:00 【One duck, one duck】
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ServletUtil {
public static HttpServletRequest getRequest(){
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
public static HttpServletResponse getResponse(){
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
}
}
边栏推荐
- Socket class understanding and learning about TCP character stream programming
- R language uses LM function to build linear regression model and subset function to specify subset of data set to build regression model (use floor function and length function to select the former pa
- 安全保障基于软件全生命周期-NetworkPolicy应用
- VOS3000如何呼入送到OKCC
- Websocket chat
- Qt5 development from introduction to mastery -- the first overview
- Rolling update strategy of deployment.
- Uva11175 digraph D and E from D to e and back
- 83.(cesium之家)cesium示例如何运行
- 浅谈WebSocket
猜你喜欢

记一次COOKIE的伪造登录

Understanding of "image denoising using an improved generic advantageous network with Wasserstein distance"

Record a fake login of cookie

论文研读--Masked Generative Distillation

83. (cesium home) how the cesium example works

Read how to deploy highly available k3s with external database

LeetCode 105.从前序与中序遍历序列构造二叉树 && 106.从中序与后序遍历序列构造二叉树

Security assurance is based on software life cycle -psp application

Qt5 development from introduction to mastery -- the first overview

MySQL开发技巧——视图
随机推荐
如何有效进行回顾会议(上)?
7. Dependency injection
Poj3275 ranking the cows
安全保障基于软件全生命周期-Istio的授权机制
了解BFC特性,轻松实现自适应布局
vite在项目中配置路径别名
Poj3268 shortest path solution
Security assurance is based on software life cycle -istio authentication mechanism
Generation of tables and contingency tables (cross tables) of R language factor data: use the summary function to analyze the list, view the chi square test results, and judge whether the two factor v
线程阻塞的三种情况。
LeetCode 0142.环形链表 II
MySql5.5之后的默认存储引擎为InnoDB。
目标检测:速度和准确性比较(Fater R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)
数据库系统概论(第5版)补充习题——第一章 绪论
安全保障基于软件全生命周期-NetworkPolicy应用
你真的了解esModule吗
Uva1599 ideal path problem solution
LeetCode 0143. 重排链表
Master closures and consolidate basic skills
url相关知识点