首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 編程語言 >  >> Java 程式設計 >> Java 相關知識

MyEclipse 配置 Spring XML 自動提示:XML Catalog 映射 XSD 本地路徑

     編輯:Java 相關知識

編輯 Spring XML 時按 Alt+/ 無提示,需在 XML Catalog 映射命名空間至本地 XSD。

配置步驟

  1. Window → Preferences → MyEclipse → Files and Editors → XML → XML Catalog
  2. 選 User Specified Entries → Add...
  3. 填寫三項:
Location: D:\baiduyun\Spring\spring_doc\soft\spring-framework-2.5.6\dist\resources\spring-beans-2.5.xsd
Key Type: Schema Location
Key: https://www.springframework.org/schema/beans/spring-beans-2.5.xsd

驗證

在 <beans> 標籤內按 Alt+/,出現 bean、property 等元素提示,屬性名、ref 等屬性同理。

擴展

同理添加 spring-context、spring-tx、spring-aop 等命名空間 XSD,實現全套 Spring XML 智能提示。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved