Extending RestfulController for a base SubClassRestfulController is not working on grails 3.0.4

前端 未结 2 1818
南笙
南笙 2020-12-22 12:28

According to Extending Restful Controller

I Can create a SubClass of this RestfulController to become a Base controller class for every rest Controller I want.

相关标签:
2条回答
  • 2020-12-22 13:16

    The problem is that the class is being recognized as a controller and the framework is attempting to create an instance of the controller. One of the criteria we use to identify if that should happen is we check to see if the class is abstract. The class in question should be marked abstract

    One way to make it work is to move it out of the grails-app/controllers directory and define it under src/main/groovy/.

    0 讨论(0)
  • Sorry. Just clean and run-app solved the problem. My fault

    0 讨论(0)
提交回复
热议问题