Documented at 4.7.2.2 The classpath*: prefix it states
This special prefix specifies that all
classpath resources that match the
given name must be obtained
(internally, this essentially happens
via a ClassLoader.getResources(…)
call), and then merged to form the
final application context definition.
Can someone explain this?
What is the difference between using classpath*:conf/appContext.xml as opposed to classpath:conf/appContext.xml without the asterisk.
SIMPLE DEFINITION
The
classpath*:conf/appContext.xmlsimply means that all appContext.xml files underconffolders in all your jars on the classpath will be picked up and joined into one big application context.In contrast,
classpath:conf/appContext.xmlwill load only one such file… the first one found on your classpath.