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


相关推荐

  • JAVA贪吃蛇小游戏_js贪吃蛇难吗

    JAVA贪吃蛇小游戏_js贪吃蛇难吗《Java小游戏实现》:贪吃蛇在完成坦克大战之后,就想到了贪吃蛇这个小游戏,因为这两个游戏太像了,因此,就决定把这个游戏来尝试的写下。接下来的几篇博文就是来记录这个小游戏实现的全过程。突然,想起,一年前(时间是2015年7月3日),我刚学习Java的时候看过别人写的这个游戏源代码,还专门写了篇博文,连接如下:http://blog.csdn.net/u010412719/article/detail

    2022年4月20日
    45
  • python库之threading

    Thismoduleconstructshigher-levelthreadinginterfacesontopofthelowerlevelpython库之_threadmo

    2021年12月29日
    31
  • DB2 数据库分区表语法[通俗易懂]

    DB2 数据库分区表语法[通俗易懂]CREATETABLE语句的PARTITIONBY子句指定了表数据的分区。该定义中使用的列被称为表分区键列。

    2022年5月3日
    84
  • 使用百度地图——入门

    使用百度地图——入门

    2022年1月17日
    41
  • 口罩预约管理系统——数据库设计(前端+PHP+MySQL)

    口罩预约管理系统——数据库设计(前端+PHP+MySQL)口罩预约管理系统(数据库设计)基本功能实现,如何结合前端基础、后端PHP和MySQL数据库实现呢?手把手教你设计数据库,搭建口罩预约管理系统,实现基本需求功能!

    2022年6月20日
    24
  • Jquery tmpl的使用

    Jquery tmpl的使用jquerytmpl简介:动态请求数据更新页面非常常用的方法,例如博客评论的分页动态加载,微博的滚动加载和定时请求加载以及ajax请求返回数据等。这些情况下,动态请求返回的数据一般不是已拼好的html就是JSON或XML,总之不在浏览器端拼接数据就在服务器端拼接数据。浏览器端根据JSON生成HTML有个很苦恼的地方就是,结构不复杂的时候还好,结构一复杂,就需要很小心的写出几乎无法维护的javas…

    2022年6月25日
    55

发表回复

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

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