context:component-scan non reconnu dans applicationContext.xml
Bonjour,
J'ai ajouté context:component-scan dans le fichier applicationContext.xml et j'ai cette erreur :
Code:
1 2 3 4
| Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context-2.5.xsd', because 1)
could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'. |
Le fichier applicationContext.xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <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-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<!-- Database Configuration -->
<import resource="classes/config/spring/beans/DataSource.xml"/>
<import resource="classes/config/spring/beans/HibernateSessionFactory.xml"/>
<!-- Beans Declaration -->
<import resource="classes/com/faycal/spring/PaysBean.xml"/>
<import resource="classes/com/faycal/spring/CiviliteBean.xml"/>
<context:component-scan base-package="com.soussou.model" />
</beans> |
Le jar spring-context est bien present