Running a Grails web application.
运行一个Grailsweb应用程序。
再次输入grailsrun - app。
Type grails create-controller test.
输入grailscreate - controller test。
I'll also talk about Grails services.
我还会讨论Grails服务。
Listing 7. A simple custom Grails tag.
清单7.简单的自定义grails标记。
Restart Grails if it is still running.
如果Grails仍在运行的话,重新启动它。
Writing your first Grails application.
编写第一个Grails应用程序。
Start up Grails if it isn't already running.
如果Grails还没有运行就启动它。
Type grails run-app to start the application.
输入grailsrun-app启动应用程序。
See Resources for more information on Grails.
有关Grails的更多信息,请参见参考资料。
Then create a new user for your Grails instance.
随后为您的Grails实例创建一个新用户。
Now you are ready to run the Grails war command.
现在可以运行Grailswar命令了。
Take a look at grails-app/views/flight/create.gsp.
查看一下grails-app/views/flight/create.gsp。
In a normal Grails application, this is not an issue.
在普通的Grails应用程序中,这不成问题。
Type grails stats at the command line to confirm this.
在命令行输入grailsstats以确认这点。
On convincing someone to try Grails for the first time.
当谈及如何去说服别人作第一次Grails的尝试时?
We're using the Grails tag library to help us out here.
此处,我们使用了Grails标签库。
Now we're ready to tell Grails where to find our database.
现在,我们准备告诉Grails在哪儿找到我们的数据库。
Type grails create-app foo to create a simple application.
输入grailscreate - appfoo创建一个简单的应用程序。
You can do the same in Grails with just a few lines of code.
您只需要几行代码就可以在Grails 中实现这一点。
All Grails artifacts are injected with a log object at run time.
所有Grails工件将在运行时使用一个log对象注入。
To run the application, simply issue the Grails command run-app.
要运行应用程序,只需发出Grails命令run - app。
Provide at least a basic level of support for Grails development.
提供至少一个支持Grails开发的基础层。
Then, enter grails run-app, and make your way to the search page.
然后输入grailsrun - app,然后进入搜索页。
For example, when you type grails clean, Clean.groovy is invoked.
例如,输入grailsclean时,调用clean . groovy。
Grails makes it easy to develop by not making you write much code.
使用Grails不必编写很多代码就可以轻松地进行开发。
Now type grails create-domain-class Hotel and look for the output.
现在输入grailscreate - domain - classHotel并查看结果。
Luckily, Grails can handle all of these view technologies with ease.
幸运的是,Grails能够轻松地处理所有这些视图技术。
but it does let us touch many of the attractive features of Grails.
但是它能够让我们接触到Grails的很多优秀功能。
But to appreciate Grails fully, you have to experience it first-hand.
不过,要想全面地鉴赏grails,还需要亲身体验一下。
应用推荐