Accès au Classpath via projet Maven
Bonjour,
Soit le code suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:parameter.properties</value>
</list>
</property>
</bean>
<bean id="systemPrereqs"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
<property name="arguments">
<util:properties>
<prop key="java.security.auth.login.config">classpath:login.conf</prop>
<prop key="java.security.krb5.conf">classpath:krb5.conf</prop>
</util:properties>
</property>
</bean> |
Mon problème est que dans le premier cas, mon parameter.properties est bien trouvé dans mon src/main/resources
Mais dans le bean suivant, mes fichiers.conf que j'ai placé exactement au même endroit que le parameter.properties ne sont pas trouvés! Je dois mettre un chemin en dur, ce qui ne rend pas l'application déployable sur deux postes différents.
Comment cela se fait-il?
Ci dessous l'arbo de mon src, je suis dans applicationPropertiesContext.xml
http://img11.hostingpics.net/pics/49...borescence.jpg
Merci d'avance :-o