1.
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
2.
<%
ServletContext ctx = pageContext.getServletContext();
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(ctx);
RechargeService rechargeService = (RechargeService)wac.getBean("rechargeService");
%>
3.
ApplicationContext ac = ContextLoader.getCurrentWebApplicationContext();
RelayService relayService = (RelayService)ac.getBean("relayService");
'Java > spring' 카테고리의 다른 글
[spring]not found config set web-context (0) | 2014.11.26 |
---|---|
[rss feed view]Spring 3 MVC And RSS Feed Example (0) | 2014.10.23 |
[spring][quartz]cron 실행주기 설정 (0) | 2014.10.01 |