1
我不知道如何設置正確的標題。關於RESTful和Action
我想這樣做:
/API /用戶/ {USER_ID}/< - > UsersController
用戶是一個動作,{USER_ID}是參數
/API /用戶/ {USER_ID} /列表
/列表 - >列表是方法。
但我想用/列表是用戶動作的另一動作
=>我可以使用
/API /用戶/ {USER_ID} /列表/ {LIST_ID}/myMethod
我可以用struts2 restful嗎?
謝謝!我試過了。但我只是調用execute方法,我不能使用方法索引,創建,編輯新的,...你能幫助我嗎? – Luc
爲什麼你不能使用索引,創建,...方法?您可以隨時重新定義用於每種請求的方法:http://struts.apache.org/development/2.x/docs/rest-plugin.html#RESTPlugin-RESTfulURLMappingLogic –
嗨Lukasz Lenart,請查看此問題&I希望您能夠幫助我。謝謝。 http://stackoverflow.com/questions/17484179/struts2-restful-mapping-configuration – Luc