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ù)組轉(zhuǎn)換為列表的兩種實(shí)現(xiàn)方式(超簡(jiǎn)單)
本文介紹了在Java中將數(shù)組轉(zhuǎn)換為列表的兩種常見方法使用Arrays.asList和Java8的Stream API,Arrays.asList方法簡(jiǎn)單易用,但返回的列表是固定大小的;而使用Stream API可以實(shí)現(xiàn)更靈活的操作,如過濾和映射,根據(jù)具體需求選擇合適的方法,感興趣的朋友一起看看吧2025-03-03
Token登陸驗(yàn)證機(jī)制的原理及實(shí)現(xiàn)
這篇文章介紹了Token登陸驗(yàn)證機(jī)制的原理及實(shí)現(xiàn),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-12-12
詳解Spring中使用@within與@target的區(qū)別
這篇文章主要介紹了Spring中使用@within與@target的一些區(qū)別,本文通過項(xiàng)目案例給大家詳細(xì)分析,給大家介紹的非常詳細(xì),代碼簡(jiǎn)單易懂,需要的朋友可以參考下2021-09-09
解決SpringBoot項(xiàng)目讀取yml文件中值為中文時(shí),在視圖頁面顯示亂碼
這篇文章主要介紹了解決SpringBoot項(xiàng)目讀取yml文件中值為中文時(shí),在視圖頁面顯示亂碼的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-08-08
Spring中的@ControllerAdvice三種用法詳解
這篇文章主要介紹了Spring中的@ControllerAdvice三種用法詳解,加了@ControllerAdvice的類為那些聲明了(@ExceptionHandler、@InitBinder或@ModelAttribute注解修飾的)方法的類而提供的<BR>專業(yè)化的@Component,以供多個(gè)Controller類所共享,需要的朋友可以參考下2024-01-01
關(guān)于JSqlparser使用攻略(高效的SQL解析工具)
這篇文章主要介紹了關(guān)于JSqlparser使用攻略(高效的SQL解析工具),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-11-11

