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

简介:

Spring Batch 在 autowire 的时候提示:

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

这个错误提示其实是在 IntelliJ 中提示的,尽管有这个错误,你的程序还是可以运行没有问题的。

spring_batch_autowire_error_01

简单来说,这个提示就是 IntelliJ 没有办法通过 Autowire 找到对应的 Bean。

如果你使用的是 Spring Batch 的话,你可以在你的 Batch 配置文件中添加:

@EnableBatchProcessing

注解。

这样的话,你的Class 就不会在 IntelliJ 中有这个错误提示了。

spring_batch_autowire_error_02

https://www.cwiki.us/display/SpringBatchZH/questions/57939048

目录
相关文章
|
9月前
|
Java 数据库连接 mybatis
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
Consider defining a bean of type ‘com.example.democrud.democurd.usermapper.DaoMapper‘ in your config
101 0
|
Java Maven
MapStruct - Couldn‘t retrieve @Mapper annotation
MapStruct - Couldn‘t retrieve @Mapper annotation
1825 0
|
Java 数据库连接 mybatis
【Spring常见错误】No qualifying bean of type
📋📋 精彩摘要:MyBatis 核心配置文件(xxxConfig.xml),该文件配置了MyBatis的一些全局信息,,包含数据库连接信息和MyBatis运行时所需的各种特性,以及设置和响应MyBatis行为的一些属性。本文将深入浅出的介绍MyBatis核心配置文件中常用的标签配置。
4131 0
|
26天前
No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency
No qualifying bean of type [com.XX.mapper.SysNameMapper ] found for dependency
33 0
|
9月前
|
XML Java 程序员
Spring启动报错--class path resource [Beans.xml] cannot be opened because it does not exist
程序员不是在去生产bug的路上,那就是在去解决bug的路上。🤣🤣🤣🤣
86 1
记一个SpringBoot中属性注入失败的问题Consider defining a bean of type ''' in your configuration...
记一个SpringBoot中属性注入失败的问题Consider defining a bean of type ''' in your configuration...
226 0
|
10月前
|
Java
springboot3 解决:Could not autowire. No beans of ‘JavaMailSender‘ type found
因为 spring-boot-starter-mail 默认使用某些包发生了变化,在 2.2.xx 版本前后不一,解决对应bug
266 0
|
10月前
|
NoSQL Java Redis
5. 成功解决:Could not autowire. No beans of 'RedisConnectionFactory' type found.
今天建了一个新项目,使用 Spring Boot 整合 Redis 时,IDEA 被提醒“Could not autowire. No beans of 'RedisConnectionFactory' type found. ”错误,意思是不能自动装配“RedisConnectionFactory”。
2190 1
|
Java 编译器
Could not autowire. No beans of ‘RedisConnectionFactory‘ type found.已解决
在创建redisTemplate时,形参列表爆出了如下错误
834 0
Could not autowire. No beans of ‘RedisConnectionFactory‘ type found.已解决
|
Java Spring
spring boot Configuration Annotation Proessor not found in classpath(贼简单)
spring boot Configuration Annotation Proessor not found in classpath(贼简单)