참고자료.
http://static.springsource.org/spring/docs/3.0.5.RELEASE/reference/scheduling.html
beans-task.xml 생성. executer 정의
beans.xml 에 추가 . ( 위치 중요)
<import resource="classpath:/beans-task.xml" /> |
@Async 할 클래스 추가 (기존 Bean이 아닌 새로운 Bean으로 정의하니 동작함.)
import java.util.ArrayList; import org.springframework.beans.factory.annotation.Autowired;
@Service // 작업 } |
Controller에 추가.
@Controller
@AutoWired AsyncProcessService asyncService;
@RequestMapping(value = "/event", method = {RequestMethod.POST, RequestMethod.GET}) asyncService.processNotifications(newSendEventList); } } |
'Web service' 카테고리의 다른 글
nginx - can't identify protocol 이슈 (0) | 2012.08.06 |
---|---|
Spring의 AbstraceDataSourceRouter를 사용하면서 MyBatis의 SqlSessionFactory를 매번 생성할 때 성능에 주는 영향 (0) | 2012.06.26 |
WAS(Tomcat)의 보안성 높이기 (0) | 2012.04.27 |
웹서버 성능과 유지보수 (0) | 2012.03.29 |
Nginx 공부 자료 (Nginx References) (0) | 2012.03.27 |