私は私のアプリのためにSpring-Boot
を使用して、私はバッチジョブを自分で管理するためにSpring Batch Admin
のAutowired
jobService
にしたいです。 しかし、私はこのautowired annotation spring bootでjobService springバッチ管理を使用するには?
@Autowied
Jobservice jobService;
を使用するとき、それは例外
No qualifying bean of type [org.springframework.batch.admin.service.JobService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
どのように私はこの例外を修正することができますがスローされます。 jobServiceについて何か設定する必要がありますか? 私が研究し、この
@Bean
public JobService jobService() throws Exception {
SimpleJobServiceFactoryBean factory = new SimpleJobServiceFactoryBean();
return factory.getObject();
}
を試してみてくださいしかし、仕事と、それは別の例外をスローしないように見えます。何かに間違った設定をしていますか?
spring-contextまたはjbo-context configuration.xmlファイルを共有しますか? –
私はxml設定を使用していません。すべてuse use annotation @Bean。 – user1697646