您的位置:首页 > 产品设计 > UI/UE

beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)

2017-06-21 13:00 489 查看
主要是这三个方面排查:

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 ...>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐