1

私はそれを使用しStruts 2.2.3.1て使用Struts2-spring plugin 2.2.3.1しています。依存性注入は正常に機能していますが、私ApplicationContextgetBeanメソッドの使用は壊れています:

WebApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(context);
AdminService service = ac.getBean(AdminService.class);

これは、Spring 3.0.6(AdminServiceは で宣言された BeanapplicationContext.xmlです。しかし、このプラグインを追加すると、次のエラーが発生します。

シンボル symbol が見つかりません: メソッド getBean(java.lang.Class) 場所: インターフェース org.springframework.web.context.WebApplicationContext

このプラグインを削除すると、機能します。どういう理由ですか ?

4

0 に答える 0