私はそれを使用しStruts 2.2.3.1
て使用Struts2-spring plugin 2.2.3.1
しています。依存性注入は正常に機能していますが、私ApplicationContext
のgetBean
メソッドの使用は壊れています:
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
このプラグインを削除すると、機能します。どういう理由ですか ?