通过spring静态获取对象
1、ApplicationContext ac= WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession()
.getServletContext());
BeanFactory bf = (BeanFactory)ac;
userPowerService = (UserPowerService)bf.getBean("userPowerService");
2、ApplicationContext acx = new FileSystemXmlApplicationContext("/config/applicationContext.xml");
MultiCataService mulCataService = (MultiCataService) acx.getBean("MultiCataService");