Spring schema加載方法

由於spring的schema文件位於網絡上,如果機器不能連接到網絡,那麼在編寫配置信息時候就無法出現提示信息,解決方法有兩種:

1。讓機器上網,eclipse會自動從網絡上下載schema文件並緩存在硬盤上。

2。手動添加schema文件,方法如下:
windwos->preferences->myeclipse->files and editors->xml->xmlcatalog
點"add",在出現的窗口中的Key Type中選擇URI,在location中選"File system",然後在spring解壓目錄的dist/resources目錄中選擇spring-beans-2.5.xsd,回到設置窗口的時候不要急着關閉窗口,應把窗口中的Key Type改爲Schema location,Key改爲http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

發佈了22 篇原創文章 · 獲贊 1 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章