如果nacos下載完成后直接啟動會報錯如下錯誤


解決方法:打開你nacos文件找到bin文件下得startup.cmd文件打開
把set MODE="cluster"修改為set MODE="standalone" (cluster為集群啟動 standalone為單機(jī)啟動)(rem是注釋得意思)
如下:


再次啟動 會報如下錯誤:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'user': Unsatisfied dependency expressed through field 'jwtTokenManager';

解決方法 打開你nacos文件找到conf文件下得application.properties 打開
找到 nacos.core.auth.plugin.nacos.token.secret.key= 在 后面加上 密鑰
SecretKey012345678901234567890123456789012345678901234567890123456789
借鑒得(https://blog.csdn.net/lad_z/article/details/129336454?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522167824647116800226517904%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=167824647116800226517904&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-14-129336454-null-null.142^v73^insert_down3,201^v4^add_ask,239^v2^insert_chatgpt&utm_term=nacos%E5%90%AF%E5%8A%A8org.springframework.beans.factory.UnsatisfiedDependencyException%3A%20Error%20creating%20bean%20with%20name%20user&spm=1018.2226.3001.4187)文章
因?yàn)閚acos 2.2.0.1版本后 默認(rèn)得key值為空,需要手動加上

如下:

添加完成后 重啟nacos 啟動成功文章來源:http://www.zghlxwxcb.cn/news/detail-548278.html

成功解決,希望這篇文章對你們有所幫助文章來源地址http://www.zghlxwxcb.cn/news/detail-548278.html
到了這里,關(guān)于第一次啟動nacos啟動注意事項(xiàng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!