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