Nacos啟動(dòng)異常與SpringBoot整合異常的問題及解決
nacos啟動(dòng)異常
問題描述:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method 'authFilterRegistration' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authFilter': Unsatisfied dependency expressed through field 'authManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthManager': Unsatisfied dependency expressed through field 'authenticationManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosAuthConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nacosUserDetailsServiceImpl': Unsatisfied dependency expressed through field 'userPersistService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'externalUserPersistServiceImpl': Unsatisfied dependency expressed through field 'persistService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalStoragePersistServiceImpl': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error]load jdbc.properties error
解決辦法:
- 啟動(dòng)時(shí)使用 如下命令
startup.cmd -m standalone
- 如果還是啟動(dòng)報(bào)錯(cuò)就嘗試刪除
- data 文件夾下的內(nèi)容 重啟Nacos
與SpringBoot整合報(bào)錯(cuò)
問題描述:
nacosProperties (field private java.util.Optional com.alibaba.cloud.nacos.NacosDiscoveryProperties.nacosAutoServiceRegistrationOptional)
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main
報(bào)錯(cuò)版本:
- nacos 注冊(cè)中心版本為2.0.3
- nacos-discovery 為 2.2.2.RElEASE
修改方法:
- 升級(jí)nacos-discovery 版本到 2.2.7.RELEASE
總結(jié)
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
Java實(shí)現(xiàn)將類數(shù)據(jù)逐行寫入CSV文件的方法詳解
這篇文章主要為大家詳細(xì)介紹了Java如何實(shí)現(xiàn)將類數(shù)據(jù)逐行寫入CSV文件,文中的示例代碼講解詳細(xì),具有一定的參考價(jià)值,需要的可以借鑒一下2022-11-11
SpringBoot雪花算法主鍵ID傳到前端后精度丟失問題的解決
本文主要介紹了SpringBoot雪花算法主鍵ID傳到前端后精度丟失問題的解決,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-08-08
springBoo3.0集成knife4j4.1.0的詳細(xì)教程(swagger3)
這篇文章主要介紹了springBoo3.0集成knife4j4.1.0的詳細(xì)教程(swagger3),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-07-07
基于Spring中的線程池和定時(shí)任務(wù)功能解析
下面小編就為大家?guī)硪黄赟pring中的線程池和定時(shí)任務(wù)功能解析。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-09-09
深度剖析Java中yyyy與YYYY區(qū)別和多種規(guī)避方案
在Java開發(fā)中,日期格式化是一個(gè)高頻場(chǎng)景,本文將從問題復(fù)現(xiàn)出發(fā),深度剖析yyyy(小寫y)和YYYY(大寫Y)的區(qū)別,揭秘周年制背后的玄機(jī),并給出多種可落地的規(guī)避方案,幫你徹底避開這個(gè)坑2026-03-03

