Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring xml configuration difference between spring-beans-3.1.xsd and spring-beans.xsd

what is the differences between

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

and

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

Because currently I almost done a Spring MVC(Java based server-side) project, and my last step is to apply my previous Spring Security Login sample to it. The Spring Security sample works flawlessly before I start my project.

Then, I realised both links above and I bump into ugly exceptions after applying my Spring Security sample.

My Spring MVC project is using this http://www.springframework.org/schema/beans/spring-beans.xsd and my Spring Security was using this http://www.springframework.org/schema/beans/spring-beans-3.1.xsd.

like image 229
Chan Chun Weng Avatar asked Apr 23 '26 09:04

Chan Chun Weng


1 Answers

If you omit the version from the .xsd the XML schema that is used will be fetched from the spring jar dependencies that your project is using, and this is the right way to go.

Checkout this answer it explains it in more detail

like image 188
Master Slave Avatar answered Apr 25 '26 04:04

Master Slave



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!