I have this in my web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-config.xml</param-value>
</context-param>
I suspect this is a convention used only by Spring? If it is, will it take my app longer to load, since I’m not specifying a direct file location, but now it must search the entire classpath?
Yes, it stands for a
ClassPathResourceand is part of Spring’sResourceabstractionNo, a) it uses the ClassLoader internally which should be fast enough. b) you don’t really have much of a choice. using files is a very bad idea in a webapp context, because it makes you dependent on implementation details that should be left to the implementing App server (a WAR may or may not be unpacked).