grails - RestClient Grails 导入失败

标签 grails groovy

我无法导入 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/

相关文章:

image - 如何在Grails GSP中显示图像?

grails - 在grails中安装elasticsearch插件时出现NoNodeAvailableException

Android studio 不生成签名 APK

grails - 跨多个数据源的GORM一对多关系

grails - 如何更改默认的message.properties

grails - 如何从grails中的数组查询数据

java - 在 Spock 框架中模拟

grails - 如何用Groovy闭包包装所有Grails服务方法?

grails - 如何打印可用的表和数据库?

java - `ClassCastException` when case object with `ScriptEngine`