LoginSignup
2
2

More than 5 years have passed since last update.

lastafluteでhttpメソッド毎にアクションメソッドを切り替える

Posted at

ものすごく簡単にですが、
こんな感じです。


// MaihamaAction
@Execute
public JsonResponse get$index() { // GET で受け取る
}
@Execute
public JsonResponse post$index() { // POST で受け取る
}
@Execute(urlPattern="{}/@word") // @word はメソッド名のキーワード、{}は引数パラメーター
public JsonResponse get$sea(Integer dockside) { // maihama/3/sea というように順番をひっくり返せる
}

参考実装はこちら
https://github.com/dbflute-session/lastaflute-test-catalog/blob/master/src/main/java/org/docksidestage/app/web/wx/restapi/WxRestapiAction.java

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2