Can anyone please let me know if the Spring 5 version of XSDs are available?
Is there something like spring-beans-5.1.xsd
, spring-context-5.1.xsd
, spring-mvc-5.1.xsd
or spring-beans-5.0.xsd
, spring-context-5.0.xsd
, spring-mvc-5.0.xsd
available in Spring ?
If available, please provide the links for those XSDs.
Also, can anyone let me tell what is the compatible version of spring-security
for Spring 5.x
?
There is no XSD available for Spring 5.
Note: Instead of providing the explicit version of XML schema better go for the generic XML schema which can support any version of spring.
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/mvc/spring-mvc.xsd (Generic)
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/context/spring-context.xsd (Generic)
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/beans/spring-beans.xsd (Generic)
So, I would recommend you to go for generic XSDs because this reduces the confusion to pick which XSD version for Spring version that you are using.
Just an example :
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- Bean declaration and other configurations -->
</beans>
Let's say if you are using spring-core 5.0.4.RELEASE
, then compatible version of spring-security is 5.0.2.RELEASE
.
If maven project, then add these dependencies in pom.xml :
<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
</dependencies>
Type spring security in the search box
Press enter.
Click on spring security core.
If it's a normal project, then download jar from https://mvnrepository.com and add the appropriate spring jars needed in your project.
You can download Spring version jar zip (all in one) from here: https://repo.spring.io/release/org/springframework/spring/
Extract it and add all the jars to your project on the classpath.