我创建了一个简单的spring应用程序,并试图在其中添加一个新的任务调度器作业。当我配置它时,它会给出编译时错误。我在谷歌上搜索了很多,但不知道为什么会这样。。这是我的配置文件。有什么想法吗
<?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:c="http://www.springframework.org/schema/c"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd">
<context:component-scan base-package="com.ibm.spring" />
<bean id="location" class="com.ibm.spring.Location" autowire="byName" scope="singleton">
<property name="addresses">
<list>
<ref bean="address2"></ref>
</list>
</property>
</bean>
<bean id="address1" class="com.ibm.spring.Address">
<property name="id" value="1"></property>
<property name="street" value="shahjahan"></property>
</bean>
<bean id="address2" class="com.ibm.spring.Address">
<property name="id" value="2"></property>
<property name="street" value="Akbar"></property>
</bean>
<bean id="restaurant" class="com.ibm.spring.Restaurant" scope="prototype">
</bean>
<task:scheduled-tasks scheduler="printingScheduler">
<task:scheduled ref="printer" method="print" fixed-delay="3000" />
</task:scheduled-tasks>
<task:scheduler id="printingScheduler" />
</beans>
它显示的编译时错误如下
The prefix "task" for element "task:scheduled-tasks" is not
已绑定。