<span style="white-space:pre"> WebApplicationContext webContext = ContextLoader .getCurrentWebApplicationContext();//获取spring容器、、获取注解注入的bean
<span style="white-space:pre"> </span>ResourcesDao resourcedao= (ResourcesDao) webContext.getBean("resourcesDao");</span>