gpt4 book ai didi

grails - Grails远程控制插件-Spring Security Configuration

转载 作者:行者123 更新时间:2023-12-02 14:58:09 24 4
gpt4 key购买 nike

每当我尝试使用Grails远程控制插件时,都会收到以下异常。

groovyx.remote.RemoteControlException: Error sending command chain to 'http://localhost:8080/******/grails-remote-control'
[test] at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:65)
[test] at groovyx.remote.client.RemoteControl.sendCommandChain(RemoteControl.groovy:114)
[test] at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:73)
[test] at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:67)
[test] at cgw.login.AbstractCGWGebSpec.msg(AbstractCGWGebSpec.groovy:35)
[test] at cgw.login.AbstractCGWGebSpec.Login to cgw application(AbstractCGWGebSpec.groovy:25)
[test] Caused by: java.io.StreamCorruptedException: invalid stream header: 3C68746D
[test] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782)
[test] at java.io.ObjectInputStream.(ObjectInputStream.java:279)
[test] at groovyx.remote.util.ClassLoaderConfigurableObjectInputStream.(ClassLoaderConfigurableObjectInputStream.groovy:26)
[test] at groovyx.remote.Result.readFrom(Result.groovy:150)
[test] at groovyx.remote.transport.http.HttpTransport.send_closure1(HttpTransport.groovy:62)
[test] at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:53)

一个简单的Google搜索显示它很可能是由于与Spring Security插件发生冲突。您可以看到它 here。不幸的是,在不深入了解Spring Security插件文档的情况下,我找不到有关如何正确配置它的任何信息。

如何配置grails-remote-control url的spring安全核心允许allowAll?

最佳答案

将以下代码放入config.groovy

grails.plugin.springsecurity.securityConfigType = 'InterceptUrlMap'

grails.plugin.springsecurity.interceptUrlMap = [
'/grails-remote-control/**': ['IS_AUTHENTICATED_ANONYMOUSLY']
]

关于grails - Grails远程控制插件-Spring Security Configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30758016/

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