Skip to content

JobLauncherCommandLineRunner always have lowest precedence #2943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tsachev opened this issue May 13, 2015 · 1 comment
Closed

JobLauncherCommandLineRunner always have lowest precedence #2943

tsachev opened this issue May 13, 2015 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@tsachev
Copy link
Contributor

tsachev commented May 13, 2015

Currently JobLauncherCommandLineRunner neither implments Ordered or have @Ordered annotation. Which mean it will get implicitly Ordered.LOWEST_PRECEDENCE.

This means one cannot define custom CommandLineRunner which is executed before JobLauncherCommandLineRunner without overriding the jobLauncherCommandLineRunner bean defined in BatchAutoConfiguration. This affects the official getting started guide spring-guides/gs-batch-processing#8.

I could do a pull request if you agree on default order value. Not sure what is the practice in such cases, but since it can be number between Integer.MIN_VALUE and Integer.MAX_VALUE, and there are no other CommandLineRunners in autoconfigure module - probably 0 should be OK.

@snicoll
Copy link
Member

snicoll commented Jan 8, 2017

Potentially related to #7656

@philwebb philwebb modified the milestones: 2.0.0.M1, 2.0.0 Jan 12, 2017
@philwebb philwebb modified the milestones: 2.0.0, 2.0.0.RC1 Nov 8, 2017
@snicoll snicoll self-assigned this Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants