请问老师,ApplicationContext接口报错​

来源:3-1 Spring IoC初体验-1

离眠

2022-12-18 10:58:08


https://img.mukewang.com/climg/639e8142092e98dc13660768.jpg

请问老师,ApplicationContext接口报错

写回答

1回答

好帮手慕小小

2022-12-18

同学你好,同学导入包后再将代码书写完整后再查看是否报错,例如:

导包:

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

代码参考:

ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

祝学习愉快~

0

0 学习 · 9886 问题

查看课程