私はSpring + GWTPを使用して自分のGWTアプリケーションを実装しました。Springを使用したGWTP ActionHandlerでのHttpServletRequestの注入
私はActionHandlerクラスにHttpServletRequestオブジェクトにアクセスしたいと思います。
ServerModuleは、@Configuration Annotationを使用したSpring Configurationクラスです。
現在の問題は、現在のHttpServletRequest、ServletContext、ServletConfigをSpringを使用してActionHandlerに注入する方法です。
@Configuration
@Import(DefaultModule.class)
public class ServerModule extends HandlerModule
{
@Bean
public UserVerficationActionHandler getUserVerificationActionActionHandler()
{
return new UserVerficationActionHandler();
}
}
上記の例では、私はちょうどHttpServletRequestを使用して春を注入したい:
ServerModuleの定義を以下に示します。
これについてのガイダンスは高く評価されています。
ありがとうございました。
私はHttpSessionListenerとFilterを使用してそれを動作させる必要があるようです。 Spring DIを使ってリクエストオブジェクトを注入できるのはいいですが。 – Bhavesh