티스토리 뷰
Quartz Schedule 사용 시 parameter 전달 xml에 설정하는 방법 arguments 에 List 식으로 추가하면 된다. 아래 소스를 보면 확인 할 수 있다.
1 2 3 4 5 6 7 8 9 10 | <bean id= "scheduleId" class = "org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" > <property name= "targetObject" ref= "scheduleService" /> <property name= "targetMethod" value= "scheduleMethod" /> <property name= "concurrent" value= "false" /> <property name= "arguments" > <list> <value> true </value> </list> </property> </bean> |
1 2 | public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethodInvoker implements FactoryBean<JobDetail>, BeanNameAware, BeanClassLoaderAware, BeanFactoryAware, InitializingBean { |
1 | public class ArgumentConvertingMethodInvoker extends MethodInvoker { |
1 2 3 4 5 6 7 8 9 | public class MethodInvoker { ... /** * Set arguments for the method invocation. If this property is not set, * or the Object array is of length 0, a method with no arguments is assumed. */ public void setArguments(Object[] arguments) { this .arguments = (arguments != null ? arguments : new Object[ 0 ]); } |
'IT > Spring' 카테고리의 다른 글
Spring Security 4.2 sessionInformationExpiredStrategy 사용 (0) | 2017.02.21 |
---|---|
logback 설정 예 (0) | 2017.02.01 |
Spring Security 4.2 Released (0) | 2016.11.15 |
WebSquare + Spring MVC Test Code (0) | 2016.10.05 |
annotation-driven 설정 없이 @ControllerAdvice 사용 설정 (0) | 2016.08.24 |