黄瓜测试执行抛出AmbiguousComponentResolutionException

时间:2018-10-18 10:13:25

标签: java spring-boot cucumber

我有一个摘要,其中将属性文件作为Spring Boot应用程序的一部分加载。它在黄瓜测试模块中被两个不同的步骤执行类所扩展,我得到以下错误。

原因:

    org.picocontainer.injectors.AbstractInjector$AmbiguousComponentResolutionException: <no-component> needs a 'AbstractClass' injected via '<unknown>',
 but there are too many choices to inject. These:[ConstructorInjector-class class1(extending AbstractClass), ConstructorInjector-class class2(extending AbstractClass)],

0 个答案:

没有答案