私は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.