Webservice
// 获取Bean
MessageContext messageContext = context.getMessageContext();
ServletContext servletContext = (ServletContext) messageContext.get(MessageContext.SERVLET_CONTEXT);
WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
ITerminologyDownloadSrv downloadSrv = (ITerminologyDownloadSrv) applicationContext
.getBean("rhinTerminologyDownloadSrv");
Servlet中:
// 获取Bean
WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
ITerminologyDownloadSrv downloadSrv = (ITerminologyDownloadSrv) applicationContext
.getBean("rhinTerminologyDownloadSrv");