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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • SQL数据库查询语句

    SQL数据库查询语句一、Select语句:select语句除了可以查看数据库中的表格和视图的信息外,还可以查看SQLServer的系统信息、复制、创建数据表。其查询功能强大,是SQL语言的灵魂语句,也是SQL中使用频率最高的语句。基本select语句:一个基本的select语句可以分解成三个部分:查找什么数据(select)、从哪里查找(from)、查找的条件是什么(where)。selec

    2022年5月16日
    57
  • 两种求集合全部子集的方法

    两种求集合全部子集的方法

    2022年2月4日
    51
  • PL/SQL语法学习(一)

    PL/SQL语法学习(一)

    2021年8月24日
    46
  • hashmap底层实现原理和源码分析(python底层源码)

    HashMap是Java开发中常用的集合,那么从我们创建一个空集合到,put添加、get获取元素经历了那些步骤呢?说明:以下源码基于JDK1.7,32位0.HashMap底层的数据结构是数组加链表的形式,存储结构如下图:1.创建一个新的HashMap集合的构造函数://初始默认数组的大小staticfinalintDEFAULT_INITIAL_CAPACITY=1&lt;&lt;…

    2022年4月16日
    45
  • R语言PCA分析_r语言可视化代码

    R语言PCA分析_r语言可视化代码R语言中的PCA分析函数R语言常用PCA分析函数有prcomp与princomp,二者主要是计算方法的差别,建议采用prcomp(SVD方法)prcomp函数prcomp函数使用较为简单,但是不同于常规的求取特征值和特征向量的方法,prcomp函数是对变量矩阵采用SVD方法计算其奇异值(原理上是特征值的平方根),函数帮助中描述为函数结果中的sdev。prcomp函数输入参数为变量矩阵(x…

    2022年10月12日
    0
  • Same Tree

    Same Tree

    2022年1月25日
    52

发表回复

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

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