Skip to content

Conversation

@minkukjo
Copy link

@minkukjo minkukjo commented May 6, 2025

Fixes: #4826

What is the problem

  • The Description of a Step of a Job declared in XML cannot be accessed through Java code.

What I Did

  • Provides an interface that allows access to the description field of a Step declared in XML from Java code.
  • Add a test to see if it can get the description field of a Step declared in XML.
  • Fix documentation for example

@minkukjo minkukjo changed the title Add a description for a step both with the XML and Java configuration styles. Add a description for a step both with the XML and Java configuration styles May 6, 2025
- Add description field and methods to AbstractJob class

- Implement description setting in JobBuilderHelper

- Add test cases for both XML and Java configurations

- Update documentation with usage examples

Signed-off-by: minkukjo <strike0115@naver.com>
Signed-off-by: minkukjo <strike0115@naver.com>
Comment on lines +23 to +33
/**
* @author Minkuk Jo
*/
public class TestTasklet implements Tasklet {

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
return RepeatStatus.FINISHED;
}

} No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created this class expecting it to be used globally in my tests, but would it have been better to create it as an inner class in JobXmlDescriptionTests?

Signed-off-by: Harry <43809168+minkukjo@users.noreply.github.com>
@minkukjo
Copy link
Author

Hi, @fmbenhassine

I hope you're doing well. I just wanted to kindly follow up on my PR
it's been open for about a month, and I’d be happy to make any changes if needed.

Thank you for your time and for maintaining this great project!

Best regards,
Minkuk Jo

Signed-off-by: Harry <43809168+minkukjo@users.noreply.github.com>
# Conflicts:
#	spring-batch-core/src/test/java/org/springframework/batch/core/job/builder/JobBuilderTests.java
Signed-off-by: minkukjo <strike0115@naver.com>
@fmbenhassine fmbenhassine changed the title Add a description for a step both with the XML and Java configuration styles Add a description for a job both with the XML and Java configuration styles Oct 16, 2025
@fmbenhassine
Copy link
Contributor

Thank you for the PR, @minkukjo ! The change set in this PR seems to only add the description to the job , not the step. So I updated the title accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add step description

2 participants