在一个*context.xml 配置文件 A 中, 有个定义的bean B, 把 A 添加到 application-context.xml 中,发现B不能正常初始化。

解决办法:

添加

<context:annotation-config />
<context:component-scan base-package="此处指向bean B的基础包" />

 

相关文章:

  • 2021-10-16
  • 2021-12-12
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-04-22
  • 2022-12-23
猜你喜欢
  • 2021-04-09
  • 2021-08-17
  • 2022-12-23
  • 2021-05-19
  • 2022-01-25
  • 2022-12-23
  • 2021-08-17
相关资源
相似解决方案