当前位置:网站首页>【Utils】ServletUtil
【Utils】ServletUtil
2022-07-28 13:12:00 【一鸭一鸭唷】
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();
}
}
边栏推荐
- 浅谈WebSocket
- 30天刷题计划(二)
- The strongest distributed locking tool: redisson
- R语言检验样本比例:使用prop.test函数执行单样本比例检验计算总体中成功样本比例p值的置信区间(设置conf.level参数指定置信水平、置信区间的大小)
- 协同办公工具:在线白板初起步,在线设计已红海
- 修订版 | 目标检测:速度和准确性比较(Faster R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)...
- R language ggplot2 visualization: visualize the scatter diagram and add text labels to the data points in the scatter diagram, using geom of ggrep package_ text_ The rep function avoids overlapping da
- Poj1860 currency exchange solution
- Understand BFC features and easily realize adaptive layout
- TS literacy method - Basic chapter
猜你喜欢

30 day question brushing plan (II)

Clickhouse分布式集群搭建

安全保障基于软件全生命周期-Istio的认证机制

7. Dependency injection

83.(cesium之家)cesium示例如何运行

Clickhouse架构与设计

离散对数问题(DLP) && Diffie-Hellman问题(DHP)

Diablo 4 ps4/ps5 beta has been added to the Playstation database

Security assurance is based on software life cycle - networkpolicy application

【LVGL事件(Events)】事件在不同组件上的应用(一)
随机推荐
修订版 | 目标检测:速度和准确性比较(Faster R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)...
R language Visual scatter diagram, geom using ggrep package_ text_ The repl function avoids overlapping labels between data points (add labels to specific areas of the visual image using the parameter
浅谈WebSocket
R语言ggplot2可视化:可视化散点图并为散点图中的数据点添加文本标签、使用ggrepel包的geom_text_repel函数避免数据点标签互相重叠(自定义指定字体类型font family)
《机器学习》(周志华) 第6章 支持向量 学习心得 笔记
7. Dependency injection
Security assurance is based on software life cycle -istio authentication mechanism
Power amplifier and matching network learning
论文研读--Masked Generative Distillation
Understand BFC features and easily realize adaptive layout
你真的了解esModule吗
R语言使用dpois函数生成泊松分布密度数据、使用plot函数可视化泊松分布密度数据(Poisson distribution)
111. The sap ui5 fileuploader control realizes local file upload and encounters a cross domain access error when receiving the response from the server
.net for subtraction, intersection and union of complex type sets
Diablo 4 ps4/ps5 beta has been added to the Playstation database
Tutorial on the principle and application of database system (061) -- MySQL exercise: operation questions 21-31 (V)
Clickhouse架构与设计
Security assurance is based on software life cycle -istio authorization mechanism
ES6 what amazing writing methods have you used
正则表达式