2015-10-07 16 views
0

我試圖與RestyGWT玩。所以我嘗試創建簡單的API並部署它。 我的API可在http://127.0.0.1:8888/api/hellos獲得。RestyGWT映射

但客戶端試圖連接到http://127.0.0.1:8888/TestApp/API /打着招呼

你能請諮詢我做錯了(也許一些建議)。

一些截圖:

  1. 我的客戶端類。 client class

  2. 我的服務器類。 My server class

  3. 這就是我稱之爲遠程方法。 [That's how I call remote method[3]

  4. 我的web.xml和* .gwt.xml。 My web.xml and *.gwt.xml

  5. 錯誤,地址錯誤(我不知道爲什麼客戶端添加TestApp)。 I don't know why client add TestApp

  6. 但API可用(在其他路徑)。 But API is available

+1

你有沒有嘗試使用'Defaults.setServiceRoot(字符串)'到您的服務設置根目錄,建議[指南](https://resty-gwt.github.io/documentation/restygwt-user-guide.html)? –

+0

它的工作!謝謝鮑里斯。 Cпасибо。 –

回答

0

這是鮑里斯Brudnoy aswer:

Defaults.setServiceRoot(String);

Doc