当前位置: 首页>>代码示例>>Java>>正文


Java JobOperator类代码示例

本文整理汇总了Java中org.springframework.batch.core.launch.JobOperator的典型用法代码示例。如果您正苦于以下问题:Java JobOperator类的具体用法?Java JobOperator怎么用?Java JobOperator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JobOperator类属于org.springframework.batch.core.launch包,在下文中一共展示了JobOperator类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public static void main(final String[] cmdArgs) {
    try (final AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext()) {
        ctx.getEnvironment().addActiveProfile(Constants.STANDARD_DATABASE);
        ctx.register(LHHuntingClubCmdContext.class);
        ctx.refresh();
        ctx.start();

        try {
            ctx.getBean(LiquibaseConfig.class).upgradeDatabase();
            ctx.getBean(JobOperator.class).startNextInstance(LHHuntingClubBatchConfig.JOB_NAME);

        } catch (Exception e) {
            LOG.error("Job execution has failed with error", e);
        }
    }
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:17,代码来源:LHHuntingClubImportCli.java

示例2: main

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public static void main(String[] args) throws Exception
{
  ServerConfigHelper.initLog4j("log4j-shell.xml");
  ClassPathXmlApplicationContext ctx = Util.initContext("batch/new-context.xml","batch-file-ac01.xml");
  JobLauncher launch = ctx.getBean(JobLauncher.class);
  JobExplorer epl=ctx.getBean(JobExplorer.class);
  JobRegistry reg =ctx.getBean(JobRegistry.class);
  JobOperator jop=ctx.getBean(JobOperator.class);
  System.out.println(epl.getJobNames()+" "+reg.getJobNames()+" "+jop.toString());
  
  
  
  for(String bn: ctx.getBeanFactory().getBeanDefinitionNames())
  {
    System.out.println(bn);
  }
  
  ctx.close();
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:20,代码来源:Test1.java

示例3: jobService

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
@Bean
public JobService jobService(JobOperator batchJobOperator,
                             JobRegistry batchJobRegistry,
                             JobExplorer jobExplorer,
                             JobLauncher jobLauncher,
                             JobRepository jobRepository) throws Exception {
	return new JobServiceImpl(jobExplorer, batchJobOperator, jobLauncher, batchJobRegistry, jobRepository);
}
 
开发者ID:namics,项目名称:spring-batch-support,代码行数:9,代码来源:BatchConfig.java

示例4: jobService

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(JobService.class)
public JobService jobService(JobOperator batchJobOperator,
                             JobRegistry batchJobRegistry,
                             JobExplorer jobExplorer,
                             JobLauncher jobLauncher,
                             JobRepository jobRepository) throws Exception {
	return new JobServiceImpl(jobExplorer, batchJobOperator, jobLauncher, batchJobRegistry, jobRepository);
}
 
开发者ID:namics,项目名称:spring-batch-support,代码行数:10,代码来源:SpringBatchDefaultServiceConfiguration.java

示例5: jobOperator

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(JobOperator.class)
public SimpleJobOperator jobOperator(JobExplorer jobExplorer, JobLauncher jobLauncher,
		ListableJobLocator jobRegistry, JobRepository jobRepository)
				throws Exception {
	SimpleJobOperator factory = new SimpleJobOperator();
	factory.setJobExplorer(jobExplorer);
	factory.setJobLauncher(jobLauncher);
	factory.setJobRegistry(jobRegistry);
	factory.setJobRepository(jobRepository);
	if (this.jobParametersConverter != null) {
		factory.setJobParametersConverter(this.jobParametersConverter);
	}
	return factory;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:16,代码来源:BatchAutoConfiguration.java

示例6: main

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public static void main(String[] args) 
{
  try
  {
    ServerConfigHelper.initConfig();
    ServerConfigHelper.initLog4j("log4j-debug.xml");
    ClassPathXmlApplicationContext ctx = Util.initContext("batch/new-context.xml");
    JobLauncher launch = ctx.getBean(JobLauncher.class);
    JobExplorer epl=ctx.getBean(JobExplorer.class);
    JobRegistry reg =ctx.getBean(JobRegistry.class);
    JobOperator jop=ctx.getBean(JobOperator.class);
    ClassPathXmlApplicationContext ctx2 = Util.initContext(false,"batch/job-context.xml","batch-file-prod.xml");
    ctx2.setParent(ctx);
    ctx2.refresh();
    Job job = ctx2.getBean(Job.class);
    JobParametersBuilder build = new JobParametersBuilder();
    build.addLong("Id", System.currentTimeMillis());
      
    
    
    JobExecution exec= launch.run(job,build.toJobParameters());
    System.out.println(reg.getJobNames());
    Thread.sleep(Long.MAX_VALUE);
  }
  catch (Exception e)
  {
    e.printStackTrace();
  }
 
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:31,代码来源:TestSubContext.java

示例7: JobMonitoringController

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public JobMonitoringController(JobOperator jobOperator,
		JobExplorer jobExplorer,
		RunningExecutionTracker runningExecutionTracker) {
	super();
	this.jobOperator = jobOperator;
	this.jobExplorer = jobExplorer;
	this.runningExecutionTracker = runningExecutionTracker;
}
 
开发者ID:codecentric,项目名称:spring-boot-starter-batch-web,代码行数:9,代码来源:JobMonitoringController.java

示例8: JobOperationsController

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public JobOperationsController(JobOperator jobOperator,
		JobExplorer jobExplorer, JobRegistry jobRegistry,
		JobRepository jobRepository, JobLauncher jobLauncher,
		JsrJobOperator jsrJobOperator) {
	super();
	this.jobOperator = jobOperator;
	this.jobExplorer = jobExplorer;
	this.jobRegistry = jobRegistry;
	this.jobRepository = jobRepository;
	this.jobLauncher = jobLauncher;
	this.jsrJobOperator = jsrJobOperator;
}
 
开发者ID:codecentric,项目名称:spring-boot-starter-batch-web,代码行数:13,代码来源:JobOperationsController.java

示例9: mBeanExporter

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
@Bean
public MBeanExporter mBeanExporter(JobOperator jobOperator) {
	Map<String, Object> map = new HashMap<>();
	map.put("kr.spring.batch:name=jobOperator", jobOperator);

	MBeanExporter exporter = new MBeanExporter();
	exporter.setBeans(map);

	return exporter;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:11,代码来源:StopConfiguration.java

示例10: EgovBatchRunner

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
/**
 * EgovBatchRunner 생성자
 * JobOperator, JobExplorer, JobRepository를 설정한다.
 * 
 * @param jobOperator
 * @param jobExplorer
 * @param jobRepository
 */
public EgovBatchRunner(JobOperator jobOperator, JobExplorer jobExplorer,
		JobRepository jobRepository) {
	
	Assert.notNull(jobOperator, "The JobOperator is mandatory");
	Assert.notNull(jobExplorer, "The JobExplorer is mandatory");
	Assert.notNull(jobRepository, "The JobRepository is mandatory");
	
	this.jobOperator = jobOperator;
	this.jobExplorer = jobExplorer;
	this.jobRepository = jobRepository;
}
 
开发者ID:eGovFrame,项目名称:egovframework.rte.root,代码行数:20,代码来源:EgovBatchRunner.java

示例11: MyOwnJobService

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public MyOwnJobService(JobExplorer jobExplorer, JobOperator jobOperator, JobLauncher jobLauncher, JobRegistry jobRegistry, JobRepository jobRepository) {
	super(jobExplorer, jobOperator, jobLauncher, jobRegistry, jobRepository);
}
 
开发者ID:namics,项目名称:spring-batch-support,代码行数:4,代码来源:MyOwnJobService.java

示例12: jobService

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
@Bean
public JobService jobService(JobOperator batchJobOperator, JobRegistry batchJobRegistry, JobExplorer jobExplorer, JobLauncher jobLauncher, JobRepository jobRepository) throws Exception {
	return new MyOwnJobService(jobExplorer, batchJobOperator, jobLauncher, batchJobRegistry, jobRepository);
}
 
开发者ID:namics,项目名称:spring-batch-support,代码行数:5,代码来源:OwnServiceConfiguration.java

示例13: jobOperator

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
public JobOperator jobOperator() {
	return jobOperator;
}
 
开发者ID:codecentric,项目名称:spring-boot-starter-batch-web,代码行数:4,代码来源:BaseConfiguration.java

示例14: getJobOperator

import org.springframework.batch.core.launch.JobOperator; //导入依赖的package包/类
/**
 * JobOperator를 사용할 수 있도록 가져온다.
 * 
 * @return JobOperator
 */
public JobOperator getJobOperator() {
	return jobOperator;
}
 
开发者ID:eGovFrame,项目名称:egovframework.rte.root,代码行数:9,代码来源:EgovBatchRunner.java


注:本文中的org.springframework.batch.core.launch.JobOperator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。