Not using version numbers in schema references

Spring can recognize the correct version of the schemas from the dependencies. Hence, it is no longer necessary to use version numbers in the schema references. The following class snippet shows an example of this:

    <?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">
<!-- Other bean definitions-->
</beans>

The preceding snippet does not specify a Spring version. It is generic. This will not need to change even when you upgrade your Spring version.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset