August 21, 2021

How to get httprequest inside controller of spring boot

private @Autowired HttpServletRequest request;

HttpServletRequest curRequest = 
((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes())
.getRequest();

No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments