티스토리 뷰

HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
// String ip = req.getRemoteAddr();
//nginx에서 주는 ip를 사용해야함.
String ip = req.getHeader("X-Forwarded-For");



참고1 : https://coderanch.com/t/445496/request-getRemoteAddr

참고2 : https://www.lesstif.com/pages/viewpage.action?pageId=20775886

댓글
댓글쓰기 폼
공지사항
Total
790,282
Today
82
Yesterday
413
«   2020/04   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
글 보관함