gpt4 book ai didi

Grails 错误 : No thread-bound request found: Are you referring to request attributes. .. 安装 Spring Security Core 后

转载 作者:行者123 更新时间:2023-12-04 00:28:24 26 4
gpt4 key购买 nike

我刚刚创建了一个新的 grails-app,
一切都很好,直到我决定
安装 Spring Security Core。

安装 Spring Security Core 后
做一个 s2-quickstart 并点击
grails run-app,它产生了
以下错误:

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 安全核心 1.2.4
Grails 2.0.0.RC1

最佳答案

如果您使用的是 Maven,请确保您的 pom.xml 中有这个:

<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>webxml</artifactId>
<version>1.4.1</version>
<scope>runtime</scope>
<type>zip</type>
</dependency>

在 BuildConfig 中,groovy:
runtime ":webxml:1.4.1"

这为我解决了 Grails 2.2.0 的问题。

关于Grails 错误 : No thread-bound request found: Are you referring to request attributes. .. 安装 Spring Security Core 后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8014972/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com