grails2.3

BuildConfig.groovy

-------------------------------------

build ":tomcat:7.0.40"

build ":hibernate:3.6.10"

compile ":scaffolding:2.0.1"

-------------------------------------


Config.groovy

-------------------------------------

debug additivity: false, stdout: [

           "grails.app.domain",

           "grails.app.controllers",

           "grails.app.services",

           "grails.app.views"

   ]

-------------------------------------


模板文件:main.gsp

-------------------------------------

<!DOCTYPE html>

<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->

<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->

<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->

<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->

<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title><g:layoutTitle default="Grails"/></title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">

<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">

<g:layoutHead/>

</head>

<body>

<div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="${resource(dir: 'p_w_picpaths', file: 'grails_logo.png')}" alt="Grails"/></a></div>

<g:layoutBody/>

<div class="footer" role="contentinfo"></div>

</body>

</html>

-------------------------------------



控制器列表:

-------------------------------------

<div id="controller-list" role="navigation">

<h2>Available Controllers:</h2>

<ul>

<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">

<li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li>

</g:each>

</ul>

</div>

-------------------------------------