【发布时间】:2014-08-05 13:34:18
【问题描述】:
这个想法是从网站(在 php 中)调用一个方法到我的应用程序(在 Grails 中)。应用程序将以 json 格式提供数据。
网站和应用程序托管在两个不同的服务器中。网站在 Yahoo 上,应用程序在 Rackspace 上。
现在,我想在我的 Grails 应用程序中创建一个 Web 服务,它以 json 格式提供城市列表。
城市类
class City {
String name
String code
}
web服务方法怎么写?
【问题讨论】:
-
您需要了解的有关 grails 中 Web 服务的所有信息都在文档中:grails.org/doc/latest/guide/webServices.html
标签: web-services rest grails