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

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • python监控网页变化教程_Python实时监控网站浏览记录实现过程详解

    python监控网页变化教程_Python实时监控网站浏览记录实现过程详解需求:(1)获取你对象chrome前一天的浏览记录中的所有网址(url)和访问时间,并存在一个txt文件中(2)将这个txt文件发送给指定的邮箱地址(你的邮箱)(3)建立例行任务,每天定时自动完成这些操作,你就可以通过邮件查看你对象每天看啥了准备macOSSierraPython3.6Chrome发送邮件的qq邮箱地址qq邮箱授权码SMTP服务器地址:smtp.qq.com接受邮件的邮箱地…

  • linuxshell(find sed awk vi)-note

    linuxshell(find sed awk vi)-note

  • django修改数据_模型

    django修改数据_模型前言在ORM框架中,所有模型相关的操作,比如添加/删除等。其实都是映射到数据库中一条数据的操作。因此模型操作也就是数据库表中数据的操作。添加一个模型到数据库中:添加模型到数据库中。首先需要创建一

  • JAVA 新手入门

    JAVA 新手入门JAVA新手入门前言基础语法Java的语言特性面向对象的思想接口泛型前言对于JDK的安装和环境配置,网上已经有很多资料,比如:这个是我随便搜的。至于编辑器的话,我个人使用的是IDEA,因为刚好有教育邮箱,可以免费使用(这一点对于没有收入来源的学生来讲真的很赞)另外,我是学习过C++的一名普通学生,所以之后的很多内容,我都会相较于C++来比较学习,这样也便于快速理解,或许对于没有C++或类似基础的同胞们不太友好,请谅解。基础语法进入正题,对于任何一门语言,相信绕不过的第一个程序,自然就是Hell

  • LocationManager的简单使用

    LocationManager在Android中可以根据LocationManager来获取设备所在的地理信息根据需求可以将定位的代码移动到所需的地方或者可以稍加改动获取城市的信息MainActivity中:packagecom.example.myapplicationpp;importandroid.Manifest;importandroid.app.Activity;…

  • PXE服务「建议收藏」

    PXE服务「建议收藏」PXE服务器简介PXE(prebootexecuteenvironment)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持来自网络的操作系统的启动过程,其启动过程中,终端要求服务器分配IP地址,再用TFTP(trivialfiletransferprotocol)或MTFTP(multicasttrivialfiletransferprotocol)协议下载一个启动软件包到本机内存中并执行,由这个启动软件包

发表回复

您的电子邮箱地址不会被公开。

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