开发者

Spring configs for webapps -> location in WEB-INF mandatory?

I have just finished building my up from bottom (database) over DAO and business layer. Now I am getting warm with the presentation layer for which I chose Spring MVC.

I have checked out the example delivered with spring-webflow-samples/booking-mvc. I was wondering why all spring configs are located in webapp/WEB-INF/config rather than java/resources. Since I have mine in latter, I wonder if it is required to have them in one particular place.

Thanks &开发者_开发百科amp; Cheers ER


The WebApplicationContext loads resources by default relative to WEB-INF. You can always prefix your resources with classpath:/ to force loading from the class resources, or instantiate your own instance of WebApplicationContext, passing in a ResourceLoader that manages loading resources from the classpath by default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜