Get spring context


	    @Autowired  
	    ApplicationContext applicationContext; 

	    // ...
	    ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
	    // ...
	    ApplicationContext context = ContextLoader.getCurrentWebApplicationContext();
	    // ...
	    ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("spring/spring-webservices.xml");//, "spring/spring-ddbb.xml", "spring/spring-properties.xml" );
	    // ...
	    ApplicationContext context = new ClassPathXmlApplicationContext("spring/spring-webservices.xml");//, "spring/spring-ddbb.xml", "spring/spring-properties.xml" );	
	    // ...
Anuncios
Get spring context