2016-02-10 14 views
1

我在春天使用ehcache。我想在離線環境中部署我的應用程序。我知道我可以下載xsd並在xsi:noNamespaceSchemaLocation中指定它的位置。是否有必要有一個XSD?在沒有xsd的離線環境中使用ehcache

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" 
     updateCheck="true" 
     monitoring="autodetect" 
     dynamicConfig="true"> 

    <cache> 
    </cache> 

</ehcache> 

回答

0

Ehcache在啓動時不需要XSD可解析,所以不用擔心。

因此,您可以在開發時提及XSD以幫助自動完成,並且在部署應用程序時仍然沒有負面影響。

0

XSI:no​​NamespaceSchemaLocation = 「ehcache.xsd」

這個位置必須是絕對路徑

這樣的:...位置= 「類路徑:/yourPathInProject/ehcache.xml」

在此之前,您需要從http://www.ehcache.org/ehcache.xsd下載ehcache.xml並將其放入您的項目中

相關問題