JobLauncherTestUtils throws NoUniqueBeanDefinitionException while trying to test spring batch steps
问题 I am using Spring boot and Spring batch. I have defined more than one job. I am trying to build junit to test specific task within a job. Therefor I am using the JobLauncherTestUtils library. When I run my test case I always get NoUniqueBeanDefinitionException. This is my test class: @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = {BatchConfiguration.class}) public class ProcessFileJobTest { @Configuration @EnableBatchProcessing static class TestConfig {