org.springframework.boot.autoconfigure.batch

Class JobLauncherCommandLineRunner

  • java.lang.Object
    • org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner
    • Field Detail

      • DEFAULT_ORDER

        public static final int DEFAULT_ORDER
        The default order for the command line runner.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JobLauncherCommandLineRunner

        public JobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher,
                                            org.springframework.batch.core.explore.JobExplorer jobExplorer)
    • Method Detail

      • setOrder

        public void setOrder(int order)
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface Ordered
      • setJobRegistry

        @Autowired(required=false)
        public void setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry)
      • setJobNames

        public void setJobNames(String jobNames)
      • setJobParametersConverter

        @Autowired(required=false)
        public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter)
      • run

        public void run(String... args)
                 throws org.springframework.batch.core.JobExecutionException
        Description copied from interface: CommandLineRunner
        Callback used to run the bean.
        Specified by:
        run in interface CommandLineRunner
        Parameters:
        args - incoming main method arguments
        Throws:
        org.springframework.batch.core.JobExecutionException
      • launchJobFromProperties

        protected void launchJobFromProperties(Properties properties)
                                        throws org.springframework.batch.core.JobExecutionException
        Throws:
        org.springframework.batch.core.JobExecutionException
      • execute

        protected void execute(org.springframework.batch.core.Job job,
                               org.springframework.batch.core.JobParameters jobParameters)
                        throws org.springframework.batch.core.repository.JobExecutionAlreadyRunningException,
                               org.springframework.batch.core.repository.JobRestartException,
                               org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException,
                               org.springframework.batch.core.JobParametersInvalidException,
                               org.springframework.batch.core.launch.JobParametersNotFoundException
        Throws:
        org.springframework.batch.core.repository.JobExecutionAlreadyRunningException
        org.springframework.batch.core.repository.JobRestartException
        org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException
        org.springframework.batch.core.JobParametersInvalidException
        org.springframework.batch.core.launch.JobParametersNotFoundException