私はgrailsアプリを書いています。結果のレンダリングには withFormat を使用します。コードは次のとおりです。
class TestController{
def index(){
def result = ["a":"1"]
withFormat {
json{ render result as JSON }
xml{ render result as XML}
}
}
}
そして、これをテストするために、URL.../test
と.../test/index.json
を使用します。.../test/index
エラーが発生し、なぜこれが起こった
のかわからないHTTP Status 404
と言われました。the requested resource is not available.