1. 程式人生 > >Invocation of destroy method failed on bean with name ‘XXXX’

Invocation of destroy method failed on bean with name ‘XXXX’

implement clas acl pan beans ins fail sco ati

項目啟動報錯問題:
Invocation of destroy method failed on bean with name ‘scopedTarget.eurekaClient‘: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name ‘eurekaInstanceConfigBean‘: Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

解決方法,在pom文件中增加以下依賴

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

Invocation of destroy method failed on bean with name ‘XXXX’