1.jar包导入系统—这两个包
2.配置application.xml
xmlns:task="https://www.springframework.org/schema/task"
https://www.springframework.org/schema/task
https://www.springframework.org/schema/task/spring-task-3.0.xsd
<task:annotation-driven/>
<context:component-scan base-package="com.netmarch.*" />
x