原创 grails中的加密

encodeAsSHA1() 使用方法:字符串.encodeAsSHA1() 即可,無需做其他任何事 encodeAsMD5() 使用方法:字符串.encodeAsMD5() 即可,無需做其他任何事

原创 grails連接各個數據庫

net.sourceforge.jtds.jdbc.Driver 通用 PostgreSQL:(2.5.1格式) 第一步,dataSource中配置: driverClassName = "org.postgresql.Driver"

原创 grails的domain繼承之後生成的表結構

Now have the follow: Category : Goods = one:many, then create-domain-class Car ,do the following modifications: cla

原创 grails中render、respond、redirect的使用

render: 界面跳轉(url不變)、向網頁輸出數據(接口都用這個) render 之後,程序會繼續執行,但是 後面不能使用 redirect 、respond 例如: def test()