Ho un'applicazione Spring MVC e un problema con i test JUnit combinati con il file applicationContext.xml.Spring - applicationContext.xml non può essere aperto perché non esiste
Nella mia classe di test JUnit scrivo:
final ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
service = (TestServiceImpl) context.getBean("testServiceImpl");
L'errore che ottengo è che aplicationContect.xml non può essere trovato:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
Ma esce nella cartella WEB-INF. Qui potete vedere l'albero del mio progetto con il file applicationContext.xml: http://img28.imageshack.us/img28/2576/treexp.png
Allora, cosa c'è di sbagliato qui? Perché il file non esiste per il test JUnit?
Grazie in anticipo & I migliori saluti.
grazie, signore. :) – Lucas