spring配置ファイルのヘッダxmlns配置の詳細説明


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 "http://www.springframework.org/schema/beans"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:aop="http://www.springframework.org/schema/aop"       xmlns:tx="http://www.springframework.org/schema/tx"  xmlns:context="http://www.springframework.org/schema/context"       xmlns:mvc="http://www.springframework.org/schema/mvc"  xmlns:task="http://www.springframework.org/schema/task"       xsi:schemaLocation="        http://www.springframework.org/schema/beans        http://www.springframework.org/schema/beans/spring-beans-3.1.xsd        http://www.springframework.org/schema/tx        http://www.springframework.org/schema/tx/spring-tx-3.1.xsd        http://www.springframework.org/schema/aop        http://www.springframework.org/schema/aop/spring-aop-3.1.xsd        http://www.springframework.org/schema/context        http://www.springframework.org/schema/context/spring-context-3.1.xsd        http://www.springframework.org/schema/mvc        http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd        http://www.springframework.org/schema/task        http://www.springframework.org/schema/task/spring-task-3.1.xsd">springを ってもう になりましたが、 でspringプロジェクトを する に が くて、ネットを じて の の の ファイルをコピーして、つい えてしまいました。
のようにspring-contextプロファイルです。
xmlns :
1.
1
2xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"これは ファイルに な です。つまりスプリングの です。
xmlファイルのデフォルトの を し、 の が されていないすべてのラベルのデフォルトの を します。
XML Schemaの を して、 の でschemaLocationの を うことができます。
2.
1xmlns:aop="http://www.springframework.org/schema/aop"これはspringプロファイルの でaopのラベルを する があります。プレフィックスはaopの であり、 のURLは を するためのアドレスは によって を するために されません。 の は に の を えることです。 が の ラベルに されると、 じプレフィックスを つすべてのサブ が じ に します。 にもcontext(コンポーネントラベルに して)、MVC(mvcラベルに して)、tx( ラベルに して)は じ です。
 
xsi:schema Laction :
1.
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
に された のためにxsd ファイルを します。そうすると、 の な を う 、これらのxsd ファイルによって のヒントを えます。 えば、 ラベルはどのように きますか?どのような がありますか?サービスを する もxsd によって をチェックします。しかし、ここでは のxmlnsの にmvc、aop、txなどにxsd のファイルを する があります。