Grails显示未调用超类的操作

Grails显示未调用超类的操作,grails,grails-2.0,grails-controller,Grails,Grails 2.0,Grails Controller,我扩展了grailsrestfulcontroller以提供自己的实现。但是如果我调用url/api/loc/1,它将不会调用超级类show方法。同时,如果我把show方法放在子类中,它就会被调用。下面是我的子类: class MYRestfulController <T> extends RestfulController<T> { def show() { log.debug("inside show") //Other cod

我扩展了grailsrestfulcontroller以提供自己的实现。但是如果我调用url/api/loc/1,它将不会调用超级类show方法。同时,如果我把show方法放在子类中,它就会被调用。下面是我的子类:

 class MYRestfulController <T> extends RestfulController<T> {
   def show() {
        log.debug("inside show")
        //Other code
    }
    }
类MYRestfulController扩展了RestfulController{
def show(){
调试(“内部显示”)
//其他代码
}
}
现在控制器:

class LocationController extends MYRestfulController<Location>{
}
class LocationController扩展MYRestfulController{
}

其他方法也在如期发挥作用。有什么想法吗?

我没有扩展RestfullController,但是随着Grails2.3.11在扩展不安控制器时,我总是不得不重新声明操作并调用其中的超类

def create(params) { super.create(params);return }
def save(params) { super.save(params);return }
def show(Long id, Long formId, params) { super.show(id,formId,params);return }
def edit(Long id, params) { super.edit(id,params);return }
def update(Long id, Long version, params) { super.update(id,version, params);return }

那叫什么?404? 你在用脚手架吗?可能是将scaffold方法注入到您的子类控制器中了?不,我没有使用scaffoldingRestfulController已经有了方法show(),可能是这导致了问题?您正在测试哪些其他方法并声称它们按预期工作?
RestfulController
中是否定义了任何有效的方法?调用此方法时收到的错误消息是什么?index()方法按预期工作。我得到的错误是HTTP404