每当我尝试使用Grails Remote Control插件时,都会遇到以下异常。
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插件文档的情况下,我找不到有关如何正确配置它的任何信息。
如何将spring安全核心配置为允许全局用于grails-remote-control网址?
答案 0 :(得分:3)
将以下代码放在config.groovy
中ccc
答案 1 :(得分:1)
如果您使用带有staticRules + controllerAnnotations的spring security 2,它也可以工作:
UITableViewCell