1

Getting the below error after adding @EnableTask in Spring Batch application

The bean 'transactionManager', defined in class path resource [org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.class], could not be registered. A bean with that name has already been defined in org.springframework.cloud.task.configuration.SimpleTaskConfiguration and overriding is disabled.
Mahmoud Ben Hassine
  • 28,519
  • 3
  • 32
  • 50
Deepak
  • 1,506
  • 1
  • 14
  • 13
  • 2
    Which Spring Boot / Cloud Task versions are you using? Adding `--spring.main.allow-bean-definition-overriding=true` should fix the issue. – Mahmoud Ben Hassine Nov 27 '18 at 11:06
  • 1
    That error should go away if you use the latest Spring Cloud Task milestones. The RC for the 2.1 release is scheduled for this week (with the fixes in it). – Michael Minella Nov 27 '18 at 14:57

0 Answers0