我无法导入 RESTClient
在我的 grails 项目中。消息是:
Groovy:unable to resolve class groovyx.net.http.RESTClient
在
BuildConfig.groovy
我没有评论:mavenRepo "http://repository.codehaus.org"
并补充说:
compile ":rest-client-builder:2.0.0"
我正在使用 grails 2.3.8 和 Windows 7。
有任何想法吗? grails install-plugin 在这个 grails 版本中不起作用。
最佳答案
rest-client-builder
插件不提供名为 groovyx.net.http.RESTClient
的类.我认为您对 Groovy 的 REST 客户端模块感到困惑:
http://groovy.codehaus.org/modules/http-builder/doc/rest.html
然而,我们不建议在 Grails 应用程序中使用上述模块,使用 rest-client-builder
会更好。插件,您只需要使用正确的 API。rest-client-builder
的文档处于
https://github.com/grails-plugins/grails-rest-client-builder/
和
http://grails.github.io/grails-data-mapping/rest-client/api/index.html
关于grails - RestClient Grails 导入失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24353035/