| Author |
Class path precedence
|
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1300
|
|
|
Whether jar's meta class path ( test.properties ) or Spring <property name="location" value="classpath:/test.properties"/> takes higher precedence ?
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
I don't understand the question. Higher precedence with what? Give me an example use case.
|
[How To Ask Questions][Read before you PM me]
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1300
|
|
Whether jar's meta class path ( test.properties ) or Spring <property name="location" value="classpath:/test1.properties"/> takes higher precedence ?
Which one loads first ?
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
Ok. Repeating the same thing twice and bolding it does not help me understand you any better.
I am going to guess you are building a Spring jar project, and test.properties is part of the project and is being bundled in the JAR. I am guessing this, because you have not told me any more details after I asked for clarification.
This bit here
Looks at the root of your jar for test.properties. There will be only one because otherwise they would overwrite each other as they would have the same name.
I still don't know what you mean by meta class path. If you mean the META-INF directory then you would have to access that property like this:
So there would be no collision.
If you are asking something totally different it sounds like you could easily run a test put different values in each location in your test.properties and see which one gets loaded.
|
 |
 |
|
|
subject: Class path precedence
|
|
|