beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)
2017-06-21 13:00
489 查看
主要是这三个方面排查:
1,注入写成这样
@Autowired
private BrandServiceImpl brandServiceImpl;
2,jar冲突,在pom.xml中
3,扫描包写的有问题
<context:component-scan ...>
1,注入写成这样
@Autowired
private BrandServiceImpl brandServiceImpl;
2,jar冲突,在pom.xml中
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <bootclasspath>${java.home}/lib/rt.jar</bootclasspath> </compilerArguments> </configuration> </plugin> </plugins>
3,扫描包写的有问题
<context:component-scan ...>
相关文章推荐
- beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)
- SSM整合单元测试出错@org.springframework.beans.factory.annotation.Autowired(required=true)}
- 报错:Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- springmcv 整合shiro报{@org.springframework.beans.factory.annotation.Autowired(required=true)}
- {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- mapper注入失败问题解决 {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- Spring异常: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- bug解决_{@org.springframework.beans.factory.annotation.Autowired(required=true)}
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- 异常:org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
- 报错解决Context initialization failed org.springframework.beans.factory.BeanCreationException
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name