junit加载pom引用项目的xml配置文件,如果定义了<beans profile="dev">,必须在测试用例类上面加上标记

@ActiveProfiles("product"),否则spring找不到<beans profile="dev">里面的配置。提示错误信息:

No bean named '*Mongo' is defined

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2021-10-29
  • 2022-01-15
猜你喜欢
  • 2021-10-21
  • 2021-12-04
  • 2021-07-27
  • 2021-11-10
  • 2021-11-20
  • 2021-11-13
  • 2021-10-16
相关资源
相似解决方案