junit测试用例加载spring配置文件
时间:2014-10-09 00:33:27
收藏:0
阅读:227
junit加载pom引用项目的xml配置文件,如果定义了<beans profile="dev">,必须在测试用例类上面加上标记
@ActiveProfiles("product"),否则spring找不到<beans profile="dev">里面的配置。提示错误信息:
No bean named ‘*Mongo‘ is defined
评论(0)