1. 현상
org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 53; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'task:scheduler'.
2. 설정
servlet-context.xml 파일에...
xmlns:task="http://www.springframework.org/schema/task" 추가된 상태...
3. 원인
xsi:schemaLocation 에도 추가되어야 한다...
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
4. 참고 소스
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component public class SchedulerTest { @Scheduled(cron = "0 15 * * * *") public void scheduleTest1() { System.out.println("schedule1 - xx:15:00"); } @Scheduled(cron = "0 25 * * * *") public void scheduleTest2() { System.out.println("schecule2 - xx:25:00 "); } @Scheduled(cron = "0 35 * * * *") public void scheduleTest3() { System.out.println("schecule2 - xx:35:00 "); } @Scheduled(cron = "0 45 * * * *") public void scheduleTest4() { System.out.println("schecule2 - xx:45:00 "); } }