/** * 供DWR框架调用获得Bean * * @param beanName * @return */ public static Object getBeanOfDwr(String beanName) { try { ServerContext ctx = ServerContextFactory.get(); if (ctx == null) { LOG.warn("ServerContext[ServerContextFactory.get()] is null."); return null; } Container container = ctx.getContainer(); return container.getBean(beanName); } catch (Exception e) { LOG.error(e.getMessage(), e); } return null; }