PartitionedHandler: How to pass the step name as an input argument ?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
Piste de recherche
Commencez par l’exemple de partitioned-batch-job et le bean partitionHandler présentés dans l’issue ; suivez la manière dont DeployerPartitionHandler reçoit le nom de son step et dont Spring résout les paramètres de méthode. Consultez la configuration ou la documentation de référence pertinente, puis documentez une manière prise en charge de fournir un nom qui ne soit pas codé en dur et vérifiez que l’exemple démarre correctement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Hello,
In the partitioned-batch-job project, the partitioned handler is created as follows:
@Bean
public PartitionHandler partitionHandler(TaskLauncher taskLauncher, JobExplorer jobExplorer, TaskRepository taskRepository) throws Exception {
...
DeployerPartitionHandler partitionHandler = new DeployerPartitionHandler(taskLauncher, jobExplorer, resource, "workerStep");
...
return partitionHandler;
}
How could I pass the step name, here "workerStep", as an input argument. I tried to modify the method like below:
@Bean
public PartitionHandler partitionHandler(TaskLauncher taskLauncher, JobExplorer jobExplorer, TaskRepository taskRepository, String stepName) throws Exception {
...
DeployerPartitionHandler partitionHandler = new DeployerPartitionHandler(taskLauncher, jobExplorer, resource, stepName);
...
return partitionHandler;
}
and I adapted the job/step definition, but it didn't work. I got an exception saying that the method requires a bean of the type String that wasn't found. Then I defined a bean:
@Bean
public String stepName() {
return new String();
}
and the exception is gone. But I don't think that might be a solution.
Could you please advise ?
Many thanks in advance.
- Langage dominant
- Java
- Étoiles
- 445
- Forks
- 310
- Merge moyen
- 11 h 6 min
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de spring-cloud/spring-cloud-task
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
spring-cloud/spring-cloud-task#954 · 1 commentaire ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
spring-cloud/spring-cloud-task#953 · 1 commentaire ·
-
status: waiting-on-feedback
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
spring-cloud/spring-cloud-task#952 · 2 commentaires ·
-
App is failing with 'taskLifecycleListener' bean initialization errors post Spring Boot 3.x upgradeOuvertestatus: waiting-on-feedback
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
spring-cloud/spring-cloud-task#950 · 2 commentaires ·
-
How to manually starting a taskOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
Toutes les issues de spring-cloud/spring-cloud-task
Issues similaires
-
ScyllaDB Manual: 3 broken linksOuvertelink-check link-check:manual
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 91/100
open-telemetry/opentelemetry-java#8870 ·
Les mainteneurs répondent en général sous 1 jour
-
P2 testing
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement javascript
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
area/core kind/bug status/triage team/core-shared
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour