问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="user" class="com.atguigu.spring5.userDaoImpl"></bean>
<bean id="service" class="com.atguigu.spring5.Service">
<constructor-arg ref="user"></constructor-arg>
</bean>
</beans>
IOException parsing XML document from class path resource [lol.xml]; nested exception is java.io.FileNotFoundException: class path resource [lol.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
我的解答思路和尝试过的方法
我想要达到的结果
使用spring5框架注入对象