Wicketを使ったSpringプロジェクトがあります。@SpringBeanアノテーションを使用して、Wicketコンポーネントにサービスを正常に挿入できます。
次に、Springアプリケーションコンテキストにアクセスします。したがって、他のサービスと同様に、ApplicationContext型のメンバー変数を宣言し、@SpringBeanで注釈を付けました。
@SpringBeanを使用してアプリケーションを注入しようとしています
public class MyPanel extends Panel {
@SpringBean
private ApplicationContext applicationContext;
...
}
ただし、実行時に、これによりエラーが発生します
bean of type [org.springframework.context.ApplicationContext] not found
ApplicationContextをWicketコンポーネントに挿入することはできませんか?もしそうなら、ApplicationContextにアクセスするための適切な方法は何でしょうか?