Skip to content
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

Supports modularizing job configuration like @EnableBatchProcessing(modular=true) #36202

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jul 4, 2023

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 4, 2023
@quaff quaff changed the title Supports modularized job configuration like @EnableBatchProcessing(modular=true) Supports modularizing job configuration like @EnableBatchProcessing(modular=true) Jul 4, 2023
@wilkinsona
Copy link
Member

Thanks for the suggestion, @quaff.

Generally speaking, I don't like the additional complexity of application context hierarchies and I suspect it's going to cause problems with AOT as well. WDYT, @fmbenhassine? Is this something that we should try to support out of the box in Boot?

@wilkinsona wilkinsona added the status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team label Jul 4, 2023
@quaff
Copy link
Contributor Author

quaff commented Jul 4, 2023

Modularizing is useful for batch applications, It's not rare that batch jobs are using similar structure, Job configuration have to be isolated to avoid naming conflict.
Hope modularizing can be used in boot without @EnableBatchProcessing.

@fmbenhassine
Copy link
Contributor

@EnableBatchProcessing(modular = true) is already causing a lot of complexity in Spring Batch itself (with a lot of interfaces and classes like ApplicationContextFactory, JobFactory, ApplicationContextJobFactory, ClasspathXmlApplicationContextsFactoryBean, and many other related APIs). This complexity is probably accidental, but is definitely causing a lot of issues in Spring Batch for no real added value. We are considering to deprecate this feature in Spring Batch. Spring Framework already provides several ways to organize application contexts to avoid naming conflicts, and users should not rely on Spring Batch's @EnableBatchProcessing(modular = true) or Spring Boot for that. I don't even see how Spring Boot could help here.

@quaff Please open a discussion on Spring Batch's side and I can show you how to modularize your app without @EnableBatchProcessing(modular = true)

@wilkinsona

Generally speaking, I don't like the additional complexity of application context hierarchies and I suspect it's going to cause problems with AOT as well. WDYT, @fmbenhassine? Is this something that we should try to support out of the box in Boot?

I defer the decision to the Boot team here, but I would not add this to Spring Boot for the same reasons you mentioned and for the reasons I listed above.

@quaff
Copy link
Contributor Author

quaff commented Jul 4, 2023

to organize application contexts to avoid naming conflicts

I've created spring-projects/spring-batch#4409

@wilkinsona
Copy link
Member

Thanks, @fmbenhassine. Thanks again for the suggestion, @quaff, but based on the above I'm going to decline this one.

@wilkinsona wilkinsona closed this Jul 4, 2023
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants