Spring Batch JpaPagingItemReader

Spring Batch JpaPagingItemReaderSpringBatch示例中是读取本地文件sample-data.csv,然后存储到数据库people表中https://github.com/spring-guides/gs-batch-processingreader@BeanpublicFlatFileItemReaderreader(){FlatFileItemReader

大家好,又见面了,我是你们的朋友全栈君。

Spring Batch示例中是读取本地文件sample-data.csv,然后存储到数据库people表中

https://github.com/spring-guides/gs-batch-processing

reader

@Bean
    public FlatFileItemReader<People> reader() {
        FlatFileItemReader<People> reader = new FlatFileItemReader<People>();
        reader.setResource(new ClassPathResource("sample-data.csv"));
        reader.setLineMapper(new DefaultLineMapper<People>() {
            {
                setLineTokenizer(new DelimitedLineTokenizer() {
                    {
                        setNames(new String[] { "firstName", "lastName" });
                    }
                });
                setFieldSetMapper(new BeanWrapperFieldSetMapper<People>() {
                    {
                        setTargetType(People.class);
                    }
                });
            }
        });
        return reader;
    }

我们新建一个db_reader用以读取数据库表中的内容,然后经过processor,重新更新到数据库中。

@Bean(destroyMethod="")
    public  ItemReader<? extends User> db_reader() {
        JpaPagingItemReader<User> reader = new JpaPagingItemReader<User>();
        String sqlQuery = "select id,username,updatetime from test.user where id = :limit ";
        try {
            JpaNativeQueryProvider<User> queryProvider = new JpaNativeQueryProvider<User>();
            queryProvider.setSqlQuery(sqlQuery);
            queryProvider.setEntityClass(User.class);
            queryProvider.afterPropertiesSet();
            reader.setEntityManagerFactory(emf);
            reader.setPageSize(3);
            reader.setQueryProvider(queryProvider);
            reader.setParameterValues(Collections.<String, Object>singletonMap("limit", 1));
            reader.afterPropertiesSet();
            reader.setSaveState(true);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return reader;
    }

新建一个step

@Bean
    public  Step step1() {
        return stepBuilderFactory
                .get("step1")
                .<User, People>chunk(10)
                .reader(db_reader())
                .processor(db_processor())
                .writer(writer())
                .build();
    }

Job中加入新增的Step

@Bean
    public Job importUserJob(JobCompletionNotificationListener listener) {
        return jobBuilderFactory
                .get("importUserJob")
                .incrementer(new RunIdIncrementer())
                .listener(listener)
                .flow(step1())
                .next(step0())
                .end()
                .build();
    }

运行效果


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.3.RELEASE)

2017-07-25 21:28:43.583  INFO 3136 --- [ main] cn.Application : Starting Application on 帅帅 with PID 3136 (D:\work\wanda\wd_workspace\spring-batch\complete\target\classes started by test in D:\work\wanda\wd_workspace\spring-batch\complete)
2017-07-25 21:28:43.587  INFO 3136 --- [ main] cn.Application : No active profile set, falling back to default profiles: default
2017-07-25 21:28:51.222  WARN 3136 --- [ main] o.s.c.a.ConfigurationClassEnhancer : @Bean method ScopeConfiguration.stepScope is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2017-07-25 21:28:51.236  WARN 3136 --- [ main] o.s.c.a.ConfigurationClassEnhancer : @Bean method ScopeConfiguration.jobScope is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2017-07-25 21:28:51.638  WARN 3136 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-07-25 21:28:51.823  WARN 3136 --- [ main] o.h.v.m.ParameterMessageInterpolator : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
2017-07-25 21:28:53.399  INFO 3136 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
2017-07-25 21:29:07.459  INFO 3136 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} inited
Hibernate: select id,username,updatetime from test.user where id = ? limit ? 2017-07-25 21:29:29.780 INFO 3136 --- [ main] cn.DBUserItemProcessor : userinfo item = User(id=1, username=hello, updatetime=hello) 2017-07-25 21:29:29.847 INFO 3136 --- [ main] cn.PeopleItemProcessor : Converting (People(personId=null, firstName=Jill, lastName=Doe)) into (People(personId=faad357c-2b24-44ec-b5fb-c685c67e37bf, firstName=JILL, lastName=DOE)) 2017-07-25 21:29:29.848 INFO 3136 --- [ main] cn.PeopleItemProcessor : Converting (People(personId=null, firstName=Joe, lastName=Doe)) into (People(personId=33a72321-7ced-491b-9a5a-b86c470f16e7, firstName=JOE, lastName=DOE)) 2017-07-25 21:29:29.848 INFO 3136 --- [ main] cn.PeopleItemProcessor : Converting (People(personId=null, firstName=Justin, lastName=Doe)) into (People(personId=aa152766-455f-4a1f-a1e3-26d325769617, firstName=JUSTIN, lastName=DOE)) 2017-07-25 21:29:29.848 INFO 3136 --- [ main] cn.PeopleItemProcessor : Converting (People(personId=null, firstName=Jane, lastName=Doe)) into (People(personId=dbddf163-3c68-435f-95a8-e5a6a4e58bc6, firstName=JANE, lastName=DOE)) 2017-07-25 21:29:29.848 INFO 3136 --- [ main] cn.PeopleItemProcessor : Converting (People(personId=null, firstName=John, lastName=Doe)) into (People(personId=8c0d65cd-d25b-4e95-a36a-5b253f04aca3, firstName=JOHN, lastName=DOE)) 2017-07-25 21:29:29.874 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : !!! JOB FINISHED! Time to verify the results 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=1, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=2, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=3, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=4, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=5, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=6, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=7, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=8, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=9, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=10, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=11, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=12, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=13, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=14, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=15, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=16, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=17, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=18, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=19, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.878 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=20, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=21, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=22, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=23, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=24, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=25, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=26, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=27, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=28, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=29, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=30, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=31, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=32, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=33, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=34, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=35, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.881 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=36, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=37, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=38, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=39, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=40, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=41, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=42, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=43, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=44, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=45, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=46, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=47, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=48, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=49, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=50, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=51, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=52, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=53, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=54, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.882 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=55, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=56, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=57, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=58, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=59, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=60, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=61, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.883 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=62, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=63, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=64, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=65, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=66, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=67, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=68, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=69, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=70, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=71, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=72, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=73, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=74, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=75, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=76, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=77, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=78, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.884 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=79, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=80, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=81, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=82, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=83, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=84, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=85, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=86, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=87, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=88, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=89, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=90, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=91, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=92, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=93, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.885 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=94, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.886 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=95, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=96, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=97, firstName=hello, lastName=hello)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=98, firstName=JILL, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=99, firstName=JOE, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=100, firstName=JUSTIN, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=101, firstName=JANE, lastName=DOE)> in the database. 2017-07-25 21:29:29.887 INFO 3136 --- [ main] cn.JobCompletionNotificationListener : Found <People(personId=102, firstName=JOHN, lastName=DOE)> in the database. 2017-07-25 21:29:29.898 INFO 3136 --- [ main] cn.Application : Started Application in 47.804 seconds (JVM running for 49.251) 2017-07-25 21:29:29.940 INFO 3136 --- [ Thread-2] com.alibaba.druid.pool.DruidDataSource : {dataSource-2} closed 2017-07-25 21:29:29.953 INFO 3136 --- [ Thread-2] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed 

参考

https://searchcode.com/codesearch/view/15759387/

http://www.programcreek.com/java-api-examples/index.php?source_dir=transgalactica-master/transGalactica-pay-job-springbatch/src/main/java/org/transgalactica/batch/salaire/context/JobConfig.java

https://jira.spring.io/browse/BATCH-2161

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/140355.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • dijkstra算法详解—简单易懂[通俗易懂]

    dijkstra算法详解—简单易懂[通俗易懂]dijkstra算法详解(迪杰斯特拉算法)~~简单易懂,代码附有详细注释,含动态演示图片

    2025年8月13日
    3
  • Centos 安装killall命令

    Centos 安装killall命令killall 命令直接可以根据进程名 kill 掉所有进程 这在有很多进程同时存在的情况下非常有用 命令格式 killall lt 进程名 gt killall 命令并不是自带的 需要安装 在 centos 下安装方法如下 yuminstallps

    2025年9月12日
    0
  • RPC协议了解

    RPC协议了解1.RPC概述RPC(RemoteProcedureCallProtocol)远程过程调用协议。通俗的描述是:客户端在不知道调用细节的情况下,调用存在于远程计算机上的某个过程或函数,就像调用本地应用程序中的一样。正确的描述是:一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议。2.RPC特点:2.1)RPC是协议:协议意味着规范。目前典型的RPC实现包括Dubbo、Thrift、Herrty等。但这些实现往往都会附加其他重要功能,例如Dubbo还包括服务管理、访问权限

    2022年5月19日
    62
  • linux时间同步

    linux时间同步

    2021年8月18日
    70
  • sudoers修改_为用户增加sudo权限(修改sudoers文件)

    sudoers修改_为用户增加sudo权限(修改sudoers文件)在使用Linux系统过程中,通常情况下,我们都会使用普通用户进行日常操作,而root用户只有在权限分配及系统设置时才会使用,而root用户的密码也不可能公开。普通用户执行到系统程序时,需要临时提升权限,sudo就是我们常用的命令,仅需要输入当前用户密码,便可以完成权限的临时提升。在使用sudo命令的过程中,我们经常会遇到当前用户不在sudoers文件中的提示信息,如果解决该问题呢?通过下面几个步骤…

    2022年6月20日
    34
  • 互联网海量视频数据的存储[通俗易懂]

    原文链接:http://www.docin.com/p-86312184.html?docfrom=rrela一、背景    互联网内容提供方式转变:用户创造内容。视频应用、网络游戏、搜索引擎等互联网衍生业务迅速发展,使得海量数据存储、管理和处理成为当今互联网公司面临的严峻问题。这些信息保存在存储设备上,便是高膨胀的海量数据,表1是不同互联网应用的规模。  互联网应用海量数据的共性:  1…

    2022年4月14日
    90

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号