2011-04-28 73 views

回答

1

除非在scope中另有規定,否則所有彈簧豆默認爲singleton。所以當你的應用程序部署時,它將在那個時候加載。

<!-- bean that uses the loaded XML configs from the db --> 
<bean id="someDAO" class="myPackage.SomeDAO"> 
     <property name="configLoader"> 
      <ref local="configLoader"/> 
     </property> 
</bean> 
<!-- bean that loads the XML data from the database --> 
<bean id="configLoader" class="myPackage.ConfigLoader" /> 
+0

我意識到這一點,但我想加載一個在數據庫中定義的blob中的bean。我想我的問題更多的是如何配置web.xml作爲常規的上下文文件。 – Andy 2011-04-28 14:31:49

+0

所以基本上 - 你想從表中加載上下文xml文件本身? – CoolBeans 2011-04-28 14:35:28

+0

感謝您的幫助。這足夠接近我所尋找的。 – Andy 2011-04-28 14:36:33

相關問題