• Y
  • List All
  • Feedback
    • This Project
    • This Group
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
2025_PROJECT / mjgo_git star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
mjgo_gitsrcmainjavaitncomcmmutilContextUtil.java
Download as .zip file
File name
Commit message
Commit date
DATABASE
first commit
2025-12-15
src/main
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
.codetogether.ignore
first commit
2025-12-15
.gitignore
first commit
2025-12-15
pom.xml
build name 수정
03-17
File name
Commit message
Commit date
java
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
resources
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
webapp
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
File name
Commit message
Commit date
egovframework
first commit
2025-12-15
itn
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
File name
Commit message
Commit date
com
5733 메인배너 이미지관리 좌표 추가
04-24
let
토스페이 캐시 적립/가상계좌 입금 콜백 구현 및 라이브 키 적용
06-26
web
first commit
2025-12-15
File name
Commit message
Commit date
api/web
first commit
2025-12-15
cmm
first commit
2025-12-15
sym/log/ulg
first commit
2025-12-15
usr/search/web
first commit
2025-12-15
uss
5733 메인배너 이미지관리 좌표 추가
04-24
utl
first commit
2025-12-15
File name
Commit message
Commit date
aspect
first commit
2025-12-15
captcha
first commit
2025-12-15
filter
first commit
2025-12-15
interceptor
first commit
2025-12-15
service
first commit
2025-12-15
session
first commit
2025-12-15
taglibs
first commit
2025-12-15
util
first commit
2025-12-15
web
first commit
2025-12-15
AltibaseClobStringTypeHandler.java
first commit
2025-12-15
ComDefaultCodeVO.java
first commit
2025-12-15
ComDefaultVO.java
first commit
2025-12-15
EgovComCrossSiteHndlr.java
first commit
2025-12-15
EgovComExcepHndlr.java
first commit
2025-12-15
EgovComOthersExcepHndlr.java
first commit
2025-12-15
EgovComTraceHandler.java
first commit
2025-12-15
EgovMessageSource.java
first commit
2025-12-15
EgovMultiPartEmail.java
first commit
2025-12-15
EgovWebUtil.java
first commit
2025-12-15
ImagePaginationRenderer.java
first commit
2025-12-15
ImagePaginationRendererWeb.java
first commit
2025-12-15
JsonResult.java
first commit
2025-12-15
LoginVO.java
first commit
2025-12-15
MjonFTSendVO.java
first commit
2025-12-15
MjonMsgSendVO.java
first commit
2025-12-15
OptimalMsgResultDTO.java
first commit
2025-12-15
ReadVO.java
first commit
2025-12-15
RestResponse.java
first commit
2025-12-15
SessionVO.java
first commit
2025-12-15
UserVO.java
first commit
2025-12-15
File name
Commit message
Commit date
ContextUtil.java
first commit
2025-12-15
Criteria.java
first commit
2025-12-15
DateUtils.java
first commit
2025-12-15
EgovBasicLogger.java
first commit
2025-12-15
EgovDoubleSubmitHelper.java
first commit
2025-12-15
EgovResourceCloseHelper.java
first commit
2025-12-15
ExcelDownloadUtil.java
first commit
2025-12-15
ExcelUploadUtil.java
first commit
2025-12-15
FaxUtil.java
first commit
2025-12-15
FileUtil.java
first commit
2025-12-15
IpUtil.java
first commit
2025-12-15
MJUtil.java
first commit
2025-12-15
MsgSendUtils.java
first commit
2025-12-15
Order.java
first commit
2025-12-15
OsProcessCheckUtil.java
first commit
2025-12-15
PayUtils.java
first commit
2025-12-15
PdfUtil.java
first commit
2025-12-15
RedirectUrlMaker.java
first commit
2025-12-15
SlackMessageFormatUtil.java
first commit
2025-12-15
StringUtil.java
first commit
2025-12-15
StringUtil2.java
first commit
2025-12-15
TokenUtil.java
first commit
2025-12-15
WebUtil.java
first commit
2025-12-15
XssFilterUtil.java
first commit
2025-12-15
hehihoho3@gmail.com 2025-12-15 7152e15 first commit UNIX
Raw Open in browser Change history
package itn.com.cmm.util; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.web.context.ContextLoader; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; /** * * @author : 이호영 * @fileName : ContextUtil.java * @date : 2023.04.07 * @description : 빈이 아닌 객체에서 스프링 빈(bean) 및 서블릿(servlet) 객체 직접 얻는 Util * =========================================================== * DATE AUTHOR NOTE * ----------------------------------------------------------- * * 2023.04.07 이호영 최초 생성 * * * */ public class ContextUtil { /** * 빈을 직접 얻습니다. * * @param beanName * @return */ public static Object getBean(String beanName) { WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext(); return context.getBean(beanName); } /** * HttpServletReqeust 객체를 직접 얻습니다. * @return */ public static HttpServletRequest getRequest() { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); return attr.getRequest(); } /** * HttpServletResponse 객체를 직접 얻습니다. * @return */ public static HttpServletResponse getResponse() { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); return attr.getResponse(); } /** * HttpSession 객체를 직접 얻습니다. * * @param gen 새 세션 생성 여부 * @return */ public static HttpSession getSession(boolean gen) { return ContextUtil.getRequest().getSession(gen); } /** * REQUEST 영역에서 가져오기 * * @param key * @return */ public static Object getAttrFromRequest(String key) { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); return attr.getAttribute(key, ServletRequestAttributes.SCOPE_REQUEST); } /** * REQUEST 영역에 객체 저장 * * @param key * @param obj */ public static void setAttrToRequest(String key, Object obj) { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); attr.setAttribute(key, obj, ServletRequestAttributes.SCOPE_REQUEST); } /** * SESSION 영역에서 가져오기 * * @param key * @return */ public static Object getAttrFromSession(String key) { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); return attr.getAttribute(key, ServletRequestAttributes.SCOPE_SESSION); } /** * Session 영역에 객체 저장 * * @param key * @param obj */ public static void setAttrToSession(String key, Object obj) { ServletRequestAttributes attr = (ServletRequestAttributes)RequestContextHolder.currentRequestAttributes(); attr.setAttribute(key, obj, ServletRequestAttributes.SCOPE_SESSION); } }

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up