grails 升級(jí)到1.2.0 版本之后需要注意的
1.默認(rèn)的webserver是tomcat.
如果想切換為jetty。grails uninstall-plugin tomcat
grails install-plugin jetty
2. 有了很多標(biāo)準(zhǔn)的規(guī)范,比如 :
1). <meta name="layout" content="indexlayout" /> 必須放入<header/>標(biāo)簽之內(nèi)。
2).urlmap中 "/test_$guid?"(controller:"test",action:"list")
"/" (controller:"index",action:"list")
root map將不會(huì)生效.
設(shè)置"/test_$guid"(controller:"test",action:"list")
"/" (controller:"index",action:"list")
root map將會(huì)生效.
等等
3. hibernate cache
在linux中如果在DataSource.groovy中設(shè)置:
hibernate {
cache.use_second_level_cache=true
cache.use_query_cache=true
cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
}
不同的用戶啟動(dòng)grails app將會(huì)出現(xiàn)/tmp/***無(wú)權(quán)限問(wèn)題
因?yàn)檫@里將采用默認(rèn)的ehcache設(shè)置
解決的辦法之一:在grails-ap/conf中加入ehcache.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect">
<diskStore path="java.io.tmpdir"/>
<cacheManagerEventListenerFactory class="" properties=""/>
<defaultCache maxElementsInMemory="10000" eternal="false" timeToLiveSeconds="120" overflowToDisk="false" diskPersistent="false"/>
<cache name="sampleCache1" maxElementsInMemory="10000" timeToIdleSeconds="300" />
<cache name="org.hibernate.cache.UpdateTimestampsCache" maxElementsInMemory="10000" timeToIdleSeconds="300" />
<cache name="org.hibernate.cache.StandardQueryCache" maxElementsInMemory="10000" timeToIdleSeconds="300" />
</ehcache>
具體的參數(shù)可以設(shè)置.
4. 其他
后續(xù)....