2015-01-05 77 views
3

是什麼Spring XML配置差異

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/beans/spring-beans-3.1.xsd

之間的差異,因爲目前我幾乎已經完成一個Spring MVC(基於Java的服務器端)項目,最後一步是將我之前的Spring Security Login示例應用到它。 Spring Security示例在開始我的項目之前完美地工作。

然後,我意識到上述兩個鏈接,我碰到我的應用Spring Security的樣品後,醜陋異常。

我的Spring MVC項目使用了這個http://www.springframework.org/schema/beans/spring-beans.xsd,我的Spring Security使用這個http://www.springframework.org/schema/beans/spring-beans-3.1.xsd

+0

的可能重複[Spring配置XML架構:帶或不帶版本(http://stackoverflow.com/questions/20894695/spring-configuration-xml-架構與有或無版本) –

回答

1

如果您忽略.xsd中的版本,則將使用XML模式從您的項目使用的spring jar依賴項中獲取,這是正確的選擇。

結帳這個answer它解釋比較詳細