天天看點

Srping Batch 不能 autowire. No beans of 'JobBuilderFactory' type found

Spring Batch 在 autowire 的時候提示:

Could not autowire. No beans of 'JobBuilderFactory' type found.

這個錯誤提示其實是在 IntelliJ 中提示的,盡管有這個錯誤,你的程式還是可以運作沒有問題的。

Srping Batch 不能 autowire. No beans of 'JobBuilderFactory' type found

簡單來說,這個提示就是 IntelliJ 沒有辦法通過 Autowire 找到對應的 Bean。

如果你使用的是 Spring Batch 的話,你可以在你的 Batch 配置檔案中添加:

@EnableBatchProcessing

注解。

這樣的話,你的Class 就不會在 IntelliJ 中有這個錯誤提示了。

Srping Batch 不能 autowire. No beans of 'JobBuilderFactory' type found
https://www.cwiki.us/display/SpringBatchZH/questions/57939048