「Spring」Quartz Job Scheduleで@Autowiredを使う方法

書式
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this));
使用例

public class InfoJob implements Job {

  @Autowired
  private Service serviceA;

 public void execute(JobExecutionContext context) throws JobExecutionException {
    SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this));
    assertNotNull("injection service", serviceA)  
 }
}

 

SpringMVC

Posted by arkgame