顯示具有 xml 標籤的文章。 顯示所有文章
顯示具有 xml 標籤的文章。 顯示所有文章

2013年3月17日 星期日

Put Spring's applicationContext.xml into src/main/resources folder

The standard folder layout of Maven is quite convenient for me, the applicationContext.xml is put into /webapp/WEB-INF instead of /src/main/resources folder. It conflicts the convention of Maven, therefore I add the following command in web.xml in order to load applicationContext.xml from /webapp/WEB-INF folder.

    contextConfigLocation
    classpath:applicationContext.xml

Reference: stackoverflow