1、如果配置文件比较长,可以分多个配置文件。有两种方式:

1)在主配置文件加标签<import/>

1     <import resource="jd/com/other/applicationContext.xml" />

2)方式:

1         ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
2                         "applicationContext.xml","applicationContext2.xml");

第二种方式很少用。

相关文章:

  • 2022-12-23
  • 2021-12-29
  • 2021-06-30
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-08-06
猜你喜欢
  • 2022-01-25
  • 2021-11-09
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案