我剛剛創建了一個新的Grails應用程序內,
一切都很好,直到我決定
安裝後Spring Security Core。
Grails的錯誤:沒有線程綁定請求中找到:你是指請求屬性......安裝Spring Security的核心
安裝Spring Security的核心
做一個S2-快速入門並創下
的Grails運行的應用程序後,它產生的
以下錯誤:
URI
/test1/
Class
java.lang.IllegalStateException
Message
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.
有人知道如何解決這一問題?
我真的很感激,如果你幫到
。我曾嘗試在其他網站上尋找
的答案,但是
我無法解決它。 :)
順便說一句,我使用:
Spring Security的核心1.2.4
Grails的2.0.0.RC1
什麼控制器並在URI/TEST1 /打?它採取了什麼行動?您可以從控制器發佈任何代碼都會有所幫助,因爲它可能是控制器內的某些內容或不在事務性會話內的服務。 – Todd
你好, 我只是腳手架所有的控制器,除了由Spring安全核心本身產生的。/test1 /是我的應用程序的名稱。 :) –
我剛剛嘗試創建一個項目,添加一個域類,在該域中生成所有內容,安裝spring-security-core,運行s2-quickstart,並且它工作正常。你有沒有試過grails清潔? – Todd