Grails 脚手架没有显示任何内容

Grails scaffolding does show nothing

我使用 grails 2.4.4

我在我的 BuildConfig 中添加了 dependenci:

dependencies {
    test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
    compile "org.grails.plugins:scaffolding:2.1.2"
}

并添加插件:

plugins {
    build ":tomcat:7.0.55"
    compile ":scaffolding:2.1.2"
    compile ':cache:1.1.8'
    compile ":asset-pipeline:1.9.9"

    runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"
}

创建域人:

package person

class Person {

    static constraints = {
    }

    String name
}

和控制器:

package person

class PersonController {

    static scaffold = Person
}

也尝试使用:static scaffold = true,也是不行。我尝试删除我的包目标。

但是在我的 url (http://localhost:8090/grails-com.learning/person) 中我什么也没看到

没有插件:

https://github.com/jeffbrown/adamscaffolding 查看项目。

grails-app/conf/BuildConfig.groovy#L49-L75

(不用在dependencies {}块中提到脚手架插件,在plugins {}块中表达)

dependencies {
    // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
    // runtime 'mysql:mysql-connector-java:5.1.29'
    // runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
    test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
}

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55"

    // plugins for the compile step
    compile ":scaffolding:2.1.2"
    compile ':cache:1.1.8'
    compile ":asset-pipeline:1.9.9"

    // plugins needed at runtime but not for compilation
    runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"

    // Uncomment these to enable additional asset-pipeline capabilities
    //compile ":sass-asset-pipeline:1.9.0"
    //compile ":less-asset-pipeline:1.10.0"
    //compile ":coffee-asset-pipeline:1.8.0"
    //compile ":handlebars-asset-pipeline:1.3.0.3"
}

grails-app/domain/person/Person.groovy

package person

class Person {

    static constraints = {
    }

    String name
}

grails-app/controllers/person/PersonController.groovy

package person

class PersonController {

    static scaffold = Person 

}

脚手架的行为符合预期。