当前位置: 代码迷 >> 综合 >> Grails note
  详细解决方案

Grails note

热度:88   发布时间:2023-12-12 20:34:13.0

命令行工具

 

grails

          create-app

          create-domain-class

          creat-tag-lib

 

          generate-views

          generate-all

 

          install-templates

 

          war

 

          test-app

 

          run-app

 

 

配置

 

国际化

grails-app/i18n/messages.properties

 

 

数据库

grails-app/conf/DataSource.groovy

enviroments {

  development : ...

  test : ...

  product : ...

}

 

 

Controller

 

render, redirect

 

def list, save, index, scfffold

 

 

Model

 

hadMany

belongTo

 

constraints

     blank, maxsize, url, unique, ...

 

mapping

     table, columns

 

 

View

 

g: each, link, if

 

createLinkTo, encodeAsHTML

 

 

  相关解决方案