2009-11-11 54 views
3

我有一個Spring配置文件彈簧idol.xml與以下命名空間聲明一個新的命名空間聲明彈簧配置:將使用Spring 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" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 

    .... 

</beans> 

我想補充的空間聲明中AOP

<?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:aop="http://www.springframework.org/schema/aop" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> 

    ... 

</beans> 

有沒有辦法使用Spring IDE辦呢?現在,我能想到的唯一的辦法就是通過與AOP命名空間聲明一個新的Spring配置文件,然後從那裏複製和粘貼聲明配置文件在我的豆子。

回答

6

Open with -> Spring Config Editor爲您提供了選項卡式視圖。其中一個選項卡是名稱空間選項卡,您可以在其中添加其他名稱空間。在那裏,你可以選擇版本或者非版本架構文件爲AOP,背景,UTIL,批次等

BTW。如果你想在根元素添加非簧命名空間(例如爲Apache CXF)使用Open with -> XML Editor並做edit namespaces