考慮這個例子加載屬性文件是給怪異的行爲
public class EmailSender {
private Properties emailProperties;
public Properties getEmailProperties() {
return emailProperties;
}
public void setEmailProperties(Properties emailProperties) {
this.emailProperties = emailProperties;
}
在applicationContext.xml
我有類似
<bean name="emailSender" class="com.api.email.EmailSender">
<property name="emailProperties" value="classpath*:email.properties"/>
</bean>
當調試什麼獲取設置,我看到
如何爲加載?
我有二傳手,更新我的問題 – daydreamer
打我吧:)! –