gpt4 book ai didi

grails - Grails oauth插件不起作用

转载 作者:行者123 更新时间:2023-12-02 13:51:27 26 4
gpt4 key购买 nike

我尝试在Grails 2.4.4空白应用程序上使用oauth插件2.6.1。
我按照文档中的说明进行了快速入门,但是,当我启动应用程序时,我有了该堆栈跟踪信息:

Message: Error creating bean with name 'grails.plugin.databasemigration.DbdocController': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'instanceControllerTagLibraryApi': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.codehaus.groovy.grails.plugins.web.api.ControllerTagLibraryApi.setTagLibraryLookup(org.codehaus.groovy.grails.web.pages.TagLibraryLookup); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.co.desirableobjects.oauth.scribe.OauthTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
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 BeanCreationException: Error creating bean with name 'instanceControllerTagLibraryApi': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.codehaus.groovy.grails.plugins.web.api.ControllerTagLibraryApi.setTagLibraryLookup(org.codehaus.groovy.grails.web.pages.TagLibraryLookup); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.co.desirableobjects.oauth.scribe.OauthTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 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 BeanCreationException: Could not autowire method: public void org.codehaus.groovy.grails.plugins.web.api.ControllerTagLibraryApi.setTagLibraryLookup(org.codehaus.groovy.grails.web.pages.TagLibraryLookup); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.co.desirableobjects.oauth.scribe.OauthTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 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 BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uk.co.desirableobjects.oauth.scribe.OauthTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 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 BeanCreationException: Error creating bean with name 'uk.co.desirableobjects.oauth.scribe.OauthTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 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 BeanCreationException: Error creating bean with name 'oauthService': Invocation of init method failed; nested exception is uk.co.desirableobjects.oauth.scribe.exception.InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 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 InvalidOauthProviderException: [:] configured as an API for facebook does not appear to be a valid Class. It should be a class extending from the org.scribe.builder.Api class
->> 48 | afterPropertiesSet in uk.co.desirableobjects.oauth.scribe.OauthService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 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

该错误似乎很明显,但是我不知道这是否是配置问题。

这是我在Config.groovy中的配置:
oauth {
providers {
twitter {
api = TwitterApi
key = 'my-key'
secret = 'my-secret'
}
}
}

最佳答案

确保已将Config.groovy中的类FacebookApi导入

关于grails - Grails oauth插件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29534130/

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