sunshineparasol1 2010-01-18 16:07
浏览 258
已采纳

struts2+spring 中action 的 scope如何设置?

如题,如何设置?设置成request 与 protype有什么区别,我设置成request,spring却报错

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bdnAction': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
查了好多,不知所云.

不知道怎么解决,请'验证失败 :wink: '迷津!!

  • 写回答

3条回答 默认 最新

  • wocsok 2010-01-19 10:26
    关注

    应该和你引入的schema有关 重新引下2.5的schema

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?