# re: 關(guān)于Spring中Log文件的位置問(wèn)題! 回復(fù) 更多評(píng)論
2006-08-18 16:54 by
在bean配置文件中定義一個(gè)PropertyPlaceholderConfigurer的bean,指定locations屬性為你的包的相對(duì)路徑。詳細(xì)討論參見(jiàn)spring in action 的自定義屬性編輯器的相關(guān)內(nèi)容。
# re: 關(guān)于Spring中Log文件的位置問(wèn)題! 回復(fù) 更多評(píng)論
2006-08-19 21:14 by
我定義了以下的bean:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list> <value>com/log/log4j.properties</value>
</list>
</property>
</bean>
但運(yùn)行時(shí)仍然提示沒(méi)有l(wèi)og配置。不知道怎么設(shè)置才好。
網(wǎng)上查了一些關(guān)于PropertyPlaceholderConfigurer的資料,都是配置數(shù)據(jù)庫(kù)連接的,不知道非web project 的log怎么配置!還望指點(diǎn)!
# re: 關(guān)于Spring中Log文件的位置問(wèn)題! 回復(fù) 更多評(píng)論
2006-11-28 12:46 by
還是不行啊,郁悶!
沒(méi)人用過(guò)?
# re: 關(guān)于Spring中Log文件的位置問(wèn)題! 回復(fù) 更多評(píng)論
2007-04-18 10:35 by
前面加個(gè)classpath就會(huì)從classpath里找了