2011-05-13 81 views
4

我已將ui-performance插件應用於我的應用程序。不幸的是,它在開發模式下運行應用程序似乎不起作用。例如,我的JavaScript導入使用「vnull」版本呈現。ui-performance插件無法在開發模式下工作(Grails)

例如

<script type='text/javascript' src='/manage/js/application__vnull.gz.js'></script> 

不引發任何異常。

我有一個標準配置

E.g.

uiperformance.enabled = true 
uiperformance.keepOriginals = true 

Im使用Grails 1.3.7。我不知道如何開始這個問題的故障查找,因爲我沒有錯誤輸出。

任何想法?由於

+0

嘗試運行'Grails的運行程序prod' – netbrain 2011-05-13 09:54:36

+1

哦,順便說一下,我可以告訴你,我只是刪除UI性能插件在我的項目,因爲它與SpringCache插件衝突。 (當使用p:dependent ..和一個緩存頁面,然後緩存頁面不包含正確的數據),而不是使用apache2模塊mod_pagespeed,我認爲這與插件的性能調整相同。繼承人鏈接http://code.google.com/p/modpagespeed/ – netbrain 2011-05-13 10:00:30

回答

3

這在文檔中描述:http://grails.org/plugin/ui-performance

構建戰爭時,插件不工作,所以你需要在開發模式來禁用它:

environments { 
    development { 
     uiperformance.enabled = false 
    } 
} 

您可以運行grails prod run-war測試它在本地沒有顯式部署到服務器。

相關問題