С объявлением пространства имен и расположением схемы вы также можете проверить синтаксис использования пространства имен, например: -
<beans xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation= http://www.springframework.org/`enter code here`schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:annotation-driven/> <!-- This is wrong -->
<context:annotation-config/> <!-- This should work -->