Springboot测试问题-org.springframework.boot.builder.SpringApplicationBuilder。<init>([Ljava / lang / Object;)V

时间:2019-05-06 12:31:53

标签: spring-boot gradle

i将spring boot升级到2.0.5.RELEASE,将spring-boot-gradle-plugin升级到2.0.5.RELEASE。当执行gradle build时,我会在测试类中收到以下错误。

├─JUnit Vintage✔junitPlatformTest │└─com.wabtec.apigateway.ApiGatewayApplicationTests✔ │└─contextLoads✘org.springframework.boot.builder.SpringApplicationBuilder。([Ljava / lang / Object;)V └─JUnit木星✔

故障(1):   JUnit Vintage:com.wabtec.apigateway.ApiGatewayApplicationTests:contextLoads     MethodSource [className ='com.wabtec.apigateway.ApiGatewayApplicationTests',methodName ='contextLoads',methodParameterTypes =''']     => java.lang.NoSuchMethodError:org.springframework.boot.builder.SpringApplicationBuilder。([Ljava / lang / Object;)V        org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:157)        org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:98)        org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:64)        org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)        org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)        org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)        org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)        org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)        org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)        org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:364)

0 个答案:

没有答案