3

I wonder if it is possible to have a bean form xml file injected by @Autowired somehow into Liferay hook. In this particular case I'm using UpgradeProcess hook. My project is already configured for using Spring with liferay, I can decode xml with ClassPathXmlApplicationContext's getBean("bean name") method, but it would be much nicer if this had happened automatically.

greetz!

4

1 に答える 1

0

デヌ可能です。

アプリケーションのweb.xmlリスナー クラスを次のように構成し、フォルダーにorg.springframework.web.context.ContextLoaderListener配置します。からそれぞれの Bean が選択され、Bean でそれらのオブジェクトを自動配線できます。applicationContext.xmlWEB-INFapplicationContext.xml

乾杯

于 2013-05-13T07:49:09.960 に答える