spring-cloud / spring-cloud/spring-cloud-task

taskBatchExecutionListener should not be added to the context if `@EnableTask` has been used.

Open
#651 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backport-2.2.x type: bug
Dominant language
Java
Stars
446
Forks
310
Avg merge
18h 18m
Merged PRs (30d)
6

Description

Currently, all SCT requires to turn on the task/batch functionality is the dependency on the classpath and there to be an instance of Job in the context. However, this means that if you are not even using @EnableTask, you still get the listener which is incorrect.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the configuration that registers taskBatchExecutionListener and the handling of @EnableTask, then inspect how a Job bean triggers task and batch support. Reproduce the context with and without @EnableTask and verify that the listener is present only when the annotation is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.