java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does not exist 解决方法

时间:2021-06-21 00:32:54
没有找到beans.xml,首先确定你项目里有这个文件吗,如果没有请添加,或者你已经存在bean配置文件,只是名字不是beans.xml,请改正名字。此外还要注意最好把bans.xml加入到classpath里,就是放到你的包里。最简单的是放在src下就行。
如果在eclipse里面,具体操作:右键项目---->properties--->Java Build Path--->source--->Add Folder --->选择beans.xml。重启服务器就OK了。