spring框架出错情况之一


当出现此情况时,首先检查applicationContext.xml文件   

可通过建立test类 通过以下两种方法加载applicationContext.xml文件 来排错测试

1.  ApplicationContext ctx = new FileSystemXmlApplicationContext("src/applicationContext.xml");       

2.    ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); 

//编译后的classes中寻找ApplicationContext绝对路径

相关文章:

  • 2021-04-22
  • 2021-10-26
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2021-03-31
  • 2021-05-04
  • 2021-05-09
猜你喜欢
  • 2021-10-01
  • 2021-12-20
  • 2021-11-20
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
相关资源
相似解决方案