J'ai dans mon applicationContext.xmlpropriétés de printemps (propriété espace réservé) Autowiring
<context:property-placeholder location="classpath*:*.properties" />
<bean id="clientPreferencesManager" class="pl.bildpresse.bildchat2.business.ClientPreferencesManager" >
<property name="clientApiUrl" value="${clientapi.url}" />
</bean>
Est-il possible de faire la même chose par autowire? Quelque chose comme:
@Autowired
@Qualifier("${clientapi.url}")
public void setClientApiUrl(String clientApiUrl) {
this.clientApiUrl = clientApiUrl;
}
vrai, pour le printemps 3.0, qui est la version actuelle. (+1) – Bozho
alors c'est le signe du dollar! pas un hachage. Merci pour le conseil. javadocs pour @Value m'a trompé –
Question idiote mais d'où vient le $ {clientapi.url} de ?? – user2441441