Myeclipse xml標籤代碼提示,引入schema

以SpringMVC爲例spring

先引入命名空間spring-mvc

須要配置mvc

xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd

效果以下ide

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd 
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

</beans>
View Code

引入schemaspa

Window->Preferences->XML->XML Catalog3d

點擊添加add選擇文件添加code

在源碼包裏找到schema文件夾下的mvc schemaxml

Key type選擇Schema locationblog

Key填寫http://www.springframework.org/schema/mvc/spring-mvc.xsd源碼

按代碼提示就會有mvc標籤提示了

相關文章
相關標籤/搜索