4

次の名前空間宣言を含むSpring構成ファイルspring-idol.xmlがあります。

<?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構成ファイルを作成し、そこから宣言をコピーして、Beanがある構成ファイルに貼り付けることです。

4

1 に答える 1

6

Open with -> Spring Config Editorタブ付きのビューを提供します。タブの1つは、名前空間タブです。このタブでは、名前空間を追加できます。そこで、aop、context、util、batchなどのバージョン管理されたスキーマファイルまたはバージョン管理されていないスキーマファイルを選択できます

ところで。スプリング以外の名前空間(apache cxfなど)を追加する場合は、ルート要素を使用Open with -> XML Editorして実行しますedit namespaces

于 2010-06-11T08:14:35.187 に答える