在不使用DisplatcherPortlet的情况下,在Portlet中使用Spring for DI with Annotations

时间:2014-12-08 18:43:16

标签: spring portlet spring-portlet-mvc

我有一大堆非常古老的Portlets代码,我需要"重构"由于在Prod中发现的错误。重构器要求我更新到新库,结果使用" Query"来自自定义DAO结构。使用Springs JdbcTemplate和注释将所有内容连接在一起的类。

但是,有很多portlet。有没有办法使用带注释的Spring,不要求我完全重写Portlet以使用DispatcherPortlet@RequestMapping?我只想标记所有Portlet和少数Servlet,只需要@Component让Spring注入我需要的类。我正在努力的方法是如何在不使用Spring提供的调度程序portlet / servlet来启动上下文的情况下引导ApplicationContext。如果可能的话,我不想直接用ApplicationContext手动拉出必要的豆子。我已经在我的web.xml中定义了contextConfigLocationContextLoaderListener

0 个答案:

没有答案