第一部分:建立乙個空白專案
4.grails會自動生成專案框架檔案,並且可以執行。
6.在瀏覽器中輸入:
,如果能看到歡迎介面就是成功了。
第二部分:了解grails專案目錄結構
如下圖所示:
至於各個目錄的作用,存放哪些東西就不細說了。
第三部分:helloworld
1.建立乙個controller,鍵入:grails create-controller hello,在controllers目錄下會產生乙個檔案: hellocontroller.groovy
class hellocontroller4.瀏覽器中輸入:http://localhost:8080/helloworld/hello, 即可看到輸出:hello,world!}
5.結束。
好了,到此為止,對grails還是一無所知,具體的如url對映關係,原理等等,以後再慢慢學習。
Grails學習筆記之GORM
1.關聯查詢 假設有以下領域物件 class account class transaction def c account.createcriteria def now new date def results c.list eq transaction.id 1 as long 如果是關聯的id...
SDL學習筆記之二
sdl su ce image sdl loadbmp image.bmp 2.從乙個表面,進行塊複製到另乙個表面 sdl blitsu ce int sdl blitsu ce sdl su ce src,sdl rect sr,sdl su e dst,sdl rect dr 第二個引數指定要傳...
SDL學習筆記之二
sdl su ce image sdl loadbmp image.bmp 2.從乙個表面,進行塊複製到另乙個表面 sdl blitsu ce int sdl blitsu ce sdl su ce src,sdl rect sr,sdl su e dst,sdl rect dr 第二個引數指定要傳...