码迷,mamicode.com
首页 > 编程语言 > 详细

如果配置spring时出现 It is indirectly referenced from required .class files

时间:2019-05-23 21:36:22      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:mis   ref   efi   col   struct   ble   release   div   com   

运行代码是出现如下错误信息:

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files
    The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException
    The method getBean(String, Class<People>) is undefined for the type ApplicationContext

出错原因:是找不到相应的依赖包,所以会出现:

It is indirectly referenced from required .class files

解决办法:
在spring文件夹下spring-framework-4.1.6.RELEASE-dist\spring-framework-4.1.6.RELEASE\libs下找到spring-beans-4.1.6.RELEASE.jar包并导入就可以了

如果配置spring时出现 It is indirectly referenced from required .class files

标签:mis   ref   efi   col   struct   ble   release   div   com   

原文地址:https://www.cnblogs.com/hzh-666/p/10914285.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!