【发布时间】:2017-06-20 05:39:57
【问题描述】:
我正在使用 spring boot、TestNG 和 PowerMock。
我扩展了AbstractTestNGSpringContextTests 并创建了ObjectFactory 作为power mock 的一部分。所有自动装配的 bean 都设置为null。也低于异常。
Caused by: java.lang.IllegalArgumentException: class org.springframework.boot.context.ConfigurationWarningsApplicationContextInitializer is not assignable to interface org.springframework.context.ApplicationContextInitializer
【问题讨论】:
-
您能发布一些代码,以便我可以在本地重新创建它吗?
标签: spring-boot mockito testng powermockito