RestClient Grails导入失败 [英] RestClient Grails Import fails

查看:274
本文介绍了RestClient Grails导入失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在我的grails项目中导入 RESTClient 。消息是:

  Groovy:无法解析类groovyx.net.http.RESTClient 

BuildConfig.groovy 中我取消注释:

  mavenRepohttp://repository.codehaus.org

并添加:

  compile:rest-client-builder:2.0.0

我使用grails 2.3.8和Windows 7。



<任何想法? grails install-plugin在此grails版本中无效。

插件不提供名为 groovyx.net.http.RESTClient 的类。我认为您对Groovy的REST客户端模块感到困惑:


http://groovy.codehaus.org/modules/http-builder/doc/rest.html



在Grails应用程序中,我们不推荐上述模块,并且使用 rest-client-builder 插件更好,您只需使用正确的API。 / p>

rest-client-builder 的文档位于

https://github.com/grails-plugins/grails-rest- client-builder /





http://grails.github.io/grails-data-mapping/rest-client/api/index。 HTML


I can't import the RESTClient in my grails project. The message is:

Groovy:unable to resolve class groovyx.net.http.RESTClient

In the BuildConfig.groovy I uncommented:

mavenRepo "http://repository.codehaus.org"

and added:

compile ":rest-client-builder:2.0.0"

I'm using grails 2.3.8 and Windows 7.

Any ideas? The grails install-plugin does not work in this grails version.

解决方案

The rest-client-builder plugin doesn't provide a class called groovyx.net.http.RESTClient. I think you are getting confused with Groovy's REST client module:

http://groovy.codehaus.org/modules/http-builder/doc/rest.html

The above module is not however recommended for us inside Grails applications and you are far better off with the rest-client-builder plugin, you just need to use the right API.

The docs for rest-client-builder are at

https://github.com/grails-plugins/grails-rest-client-builder/

and

http://grails.github.io/grails-data-mapping/rest-client/api/index.html

这篇关于RestClient Grails导入失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆