it is maybe find a BUG of spring cloud netflix -
i sorry, english bad.
i use feign
, spring boot test
in eureka client
, when mvn install
fires error:
2017-08-21 12:00:52.378 warn 9952 --- [ thread-5] s.c.a.annotationconfigapplicationcontext : exception thrown applicationlistener handling contextclosedevent org.springframework.beans.factory.beancreationnotallowedexception: error creating bean name 'eurekaautoserviceregistration': singleton bean creation not allowed while singletons of factory in destruction (do not request bean beanfactory in destroy method implementation!) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:216) [spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:302) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:197) ~[spring-beans-4.3.10.release.jar:4.3.10.release] @
so in test class:
//@runwith(springrunner.class) //@springboottest public class apiapplicationtests { // @test public void contextloads() { } }
Comments
Post a Comment