-
Couldn't load subscription status.
- Fork 2.5k
Closed
Labels
Milestone
Description
As of v5.2, both AbstractJob and AbstractStep implement BeanNameAware. So it could be possible to use the bean name as a default job/step name in order to avoid duplication:
@Bean
public Job job(JobRepository jobRepository, Step step) {
-- return new JobBuilder("job", jobRepository)
++ return new JobBuilder(jobRepository)
.start(step)
.build();
}Obviously, the current constructor that takes the job/step name should remain to be able to specify a different name if needed.
cc @joshlong