我試圖加載從Java類中的applicationContext.xml使用如何加載applicationContext.xml的
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
和
ApplicationContext context = new FileSystemXmlApplicationContext("applicationContext.xml");
Web應用程序我的問題是如何從加載applicationContext.xml中一個java類。 applicationContext.xml是WEB-INF。那可能嗎?
@Sufala AS是這樣的有用嗎? –
謝謝,我明白了!請參閱:http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#beans-java-instantiating-container-web – Eddy