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

沒有留言:

張貼留言