1
我使用的是spring引导,TestNG和PowerMock。SpringBoot TestNg和PowerMock
我扩展了AbstractTestNGSpringContextTests
并创建了ObjectFactory
作为功能模拟的一部分。所有获得自动装配的bean都被设置为null
。也得到例外。
Caused by: java.lang.IllegalArgumentException: class org.springframework.boot.context.ConfigurationWarningsApplicationContextInitializer is not assignable to interface org.springframework.context.ApplicationContextInitializer
你可以发布一些代码,以便我可以在我的本地重新创建吗? – javaPlease42