<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.inho.scheduler" />
<beans:bean class="com.inho.scheduler.scheduled.DBPolling" />
<task:annotation-driven scheduler="scheduler"/>
<task:scheduler id="scheduler" pool-size="10"/>
</beans:beans>
package com.inho.scheduler.scheduled;
import org.springframework.scheduling.annotation.Scheduled;
public class DBPolling {
@Scheduled(fixedRate=1000)
public void dbPolling() {
System.out.println("DB polling...");
}
}
2012. 1. 13 오후 2:55:46 org.apache.coyote.http11.Http11Protocol start
정보: Starting Coyote HTTP/1.1 on http-8080
DB polling...
2012. 1. 13 오후 2:55:46 org.apache.jk.common.ChannelSocket init
정보: JK: ajp13 listening on /0.0.0.0:8009
2012. 1. 13 오후 2:55:46 org.apache.jk.server.JkMain start
정보: Jk running ID=0 time=0/103 config=null
2012. 1. 13 오후 2:55:46 org.apache.catalina.startup.Catalina start
정보: Server startup in 2852 ms
DB polling...
DB polling...
DB polling...
DB polling...
Spring 외부 properties 설정 (0) | 2012.07.03 |
---|---|
[Spring] Async pattern 예제 (0) | 2012.01.30 |
flex 4 + blazeDS + spring 3 연동하기-4(Remote service 만들기) (0) | 2011.06.20 |
flex 4 + blazeDS + spring 3 연동하기-3(spring 설정) (0) | 2011.06.17 |
flex 4 + blazeDS + spring 3 연동하기-2(project 생성) (0) | 2011.06.16 |
댓글 영역