【问题标题】:Grails The requested resource (/Receipts/receipts/index) is not availableGrails 请求的资源(/Receipts/receipts/index)不可用
【发布时间】:2012-06-15 15:18:34
【问题描述】:

我一直在尝试学习 Grails,但是遇到了以下问题。我创建了四个域类(Receipts、Items、Categories 和 Owners),并为每个域类创建了四个控制器(ReceiptsController、ItemsController、CategoriesController 和 OwnersController)。域和控制器都在 com.receipts 包中。

在每个控制器中,我只有以下内容:

package com.receipts

class ReceiptsController {

     static scaffolding = Receipts

}

但是,当我启动服务器 (localhost:8080) 时,对于四个控制器中的每一个,我都会收到以下错误:

"The requested resource (/Receipts/receipts/index) is not available"

有人知道这里发生了什么吗?我还尝试了以下脚手架格式:

  • 静态脚手架 = true
  • def 脚手架 = 收据
  • def 脚手架 = true

...那些也不起作用。我还尝试为 Receipts 域类生成视图,但这也没有做任何事情。清理项目也不行。

谢谢!

【问题讨论】:

    标签: grails controller sts-springsourcetoolsuite


    【解决方案1】:

    正确的代码是

    static scaffold = true
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-19
      • 2015-10-17
      • 2015-05-26
      • 2011-11-30
      • 1970-01-01
      • 1970-01-01
      • 2013-06-26
      相关资源
      最近更新 更多