Am new to spring and I know this question has been asked many times, but I had to ask it again.
I guess,I have done appropriate namespace declarations, but still facing the error "The prefix "context" for element "context:component-scan" is not bound."
There is a similar question here, but I dint get the answer
Here is my xml document, Is it that my namespace is not correct ?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="point1" class="org.sri.proj.Point">
<property name="x" value="0" />
<property name="y" value="0" />
</bean>
<bean id="point2" class="org.sri.proj.Point">
<property name="x" value="10" />
<property name="y" value="10" />
</bean>
<context:component-scan base-package="org.sri.proj"/>
</beans>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…