Grails 创建名为';无状态失效特肯过滤器
我试图使用GrailsSpringSecurity无状态插件,但我遇到了以下异常。我所做的与文档完全相同,但我无法启动应用程序 Grails版本2.4.4 jdk1.7.0_79Grails 创建名为';无状态失效特肯过滤器,grails,spring-security,Grails,Spring Security,我试图使用GrailsSpringSecurity无状态插件,但我遇到了以下异常。我所做的与文档完全相同,但我无法启动应用程序 Grails版本2.4.4 jdk1.7.0_79 Configuring Spring Security Stateless ... ... finished configuring Spring Security Stateless | Error 2017-02-24 12:24:36,402 [localhost-startStop-1] ERROR conte
Configuring Spring Security Stateless ...
... finished configuring Spring Security Stateless
| Error 2017-02-24 12:24:36,402 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
Message: Error creating bean with name 'statelessInvalidateTokenFilter': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
Line | Method
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by ConversionNotSupportedException: Failed to convert property value of type 'groovy.util.ConfigObject' to required type 'java.lang.String' for property 'endpointUrl'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by IllegalStateException: Cannot convert value of type [groovy.util.ConfigObject] to required type [java.lang.String] for property 'endpointUrl': no matching editors or conversion strategy found
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Error |
Forked Grails VM exited with error
|Server running. Browse to http://localhost:8080/security244
配置属性的名称不正确。检查确切的名称,然后在
application.groovy/.yml
文件中定义它。问题是plugin as plugin未定义任何默认值,因此如果在应用程序中未定义属性,groovy会引发此异常您可能缺少以下属性:
grails.plugin.security.stateless.springsecurity.invalidate.active=false
grails.plugin.security.stateless.springsecurity.invalidate.endpointUrl="/stateless/yourinvalidateurl"
将这些添加到Config.groovy中,它应该可以工作无法将“groovy.util.ConfigObject”类型的属性值转换为属性“endpointUrl”所需的类型“java.lang.String”