You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.