Quartz Spring Test JUnit

1

How do you use a Job that is Clustering in Spring?

  • Spring 4.3
  • Quartz 2.2.3

Job declaration example

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class SysEncryptEmailSendSystemJob implements Job{
..
   @Override
   public void execute(final JobExecutionContext context) throws 
       JobExecutionException {
   }
}

My factory

@Autowired
@Qualifier(value = SysConfig.SCHEDULER_FACTORY)
private SchedulerFactoryBean schedulerFactory;

I know I could annotate as @Component but thus lose the quartz functionality, the goal of doing the IOC is to test with JUnit!

Any way to do this? has anyone done?

    
asked by anonymous 06.03.2018 / 23:24

0 answers