spring cloud 客戶端啓動報錯

·Destroy method on bean with name ‘scopedTarget.eurekaClient’ threw an exception: 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!)

Registering application UNKNOWN with eureka with status UP

DiscoveryClient_UNKNOWN/DESKTOP-MQ8D0C9:8761 > - was unable to refresh its cache! status = Cannot execute request on any known server

項目啓動後自動停止,在控制檯沒看到啓動的端口,估計是沒有引入spring boot的web包

在pom文件中引入如下

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

重啓解決問題。=

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章