classpath in Spring Context configuration

Generic1

Top Contributor
Hallo,

bei uns im Spring Kontext steht unter anderem folgendes:

[XML]
<util😛roperties ... location="classpath:...
[/XML]

mir ist jetzt nicht ganz klar, was der "classpath"- Ausdruck macht.
Kann das vielleicht jemand kurz erklären?
Vor allem was macht <util😛roperties -> liest das Properties in die Applikation ein, welche ich dann mit System.getProperty("key") holen kann?

Besten Dank!!
lg
Generuc1
 
Zuletzt bearbeitet:
Kurzes googlen hätte dir hier auch geholfen...


<!-- creates a java.util.Properties instance with values loaded from the supplied location -->
<util😛roperties id="jdbcConfiguration" location="classpath:com/foo/jdbc-production.properties"/>
Appendix A. XML Schema-based configuration

Und classpath sagt lediglich aus, dass sich das File in deinem Java Classpath befinden muss und dort unter com/foo/jdbc-production.properties zu finden ist.
 

Neue Themen


Zurück
Oben