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)


相关推荐

  • show contrl e1 解释

    show contrl e1 解释

  • .net cms开源_基于vue的开源CMS

    .net cms开源_基于vue的开源CMS提起开源cms,大家第一想到的是php的cms,因为php开源的最早,也最为用户和站长们认可,随着各大cms系统的功能的不断完善和各式各样的开源cms的出现,.net和java的高端的cms系统也逐渐的走上了开源的路线,尤其是.net的cms系统,从最早国外的开源,到现在国内致力于.net的cms系统的研发的公司和团队也渐渐认清楚开源路线的必然性,于是乎竞相的提出开源战略路线,但有的还是并不是全

  • 怎么复制一台虚拟机到另外一台电脑上

    怎么复制一台虚拟机到另外一台电脑上怎么复制一台虚拟机到另外一台电脑上

  • oracle的视图转mysql_oracle视图迁移到mysql[通俗易懂]

    oracle视图迁移mysql(仅记录当前项目遇到的小问题和解决方案)涉及问题点:1、函数差异oracle              mysql判断空值:  nvl(‘字段‘,值)            ifnull(‘字段‘,值)条件赋值:  decode()            casewhenthenelseend日期格式化: to_char(‘date‘,‘yy…

  • 声源定位「建议收藏」

    声源定位「建议收藏」声源定位一.简介 声音定位是人们感知周围事物的一个重要部分。即使看不到那里有什么,我们也可以根据声音大致判断出我们周围有什么。尝试在电子设备中复制相同的系统可以证明是一种有价值的方式来感知机器人、安全和一系列其他应用的环境。我们构造了一个三角形排列的麦克风来定位任意声音的方向。通过记录来自三个麦克风的输入,我们可以将记录相互关联,以识别音频记录之间的时间延迟。因为三个麦克风的物理位置是已知的,…

  • Java_InetAddress类[通俗易懂]

    Java_InetAddress类[通俗易懂]InetAddress类地址的表示域名IP地址获取地址获取Internet上主机的地址获取本地机的地址地址的表示Internet上的主机有两种表示地址的方式:域名、IP地址域名例如:www.henu.edu.cnIP地址例如:202.108.35.210java.net包中的InetAddress类对象含有一个Internet主机地址的域名和IP地址:www.sina.com.cn/202.108.35.210域名容易记忆,在连接网络时输入一个主机的域名后,域名服务器(DNS)负责将域名转

发表回复

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

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