Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:

这篇具有很好参考价值的文章主要介绍了Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

 在GitHub上下了一个Nacos的2.2.0.1版本,直接解压,安装到本地,启动服务失败。。what??
查看了一下报错信息,它给了提示,去这个网站(https://nacos.io/zh-cn/docs/v2/guide/user/auth.html)查看一下原因。

UnsatisfiedDependencyException: Error creating bean with name 'user': Unsatisfied dependency expressed through field 'jwtTokenManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtTokenManager' defined in URL [jar:file:/D:/nacos-server-2.2.0.1/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-plugin-default-impl-2.2.0.jar!/com/alibaba/nacos/plugin/auth/impl/JwtTokenManager.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.plugin.auth.impl.JwtTokenManager]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: the length of secret key must great than or equal 32 bytes; And the secret key  must be encoded by base64.Please see https://nacos.io/zh-cn/docs/v2/guide/user/auth.html
  1. 官网给的提示是,在2.2.0.1版本之后,不提供以下的默认值了。
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务

  2. 然后我就去本地的application.properties看了一下,果然是空的!一阵操作,给他补上
    这里官网给了示例,我就直接按照他给的示例做了密钥填充。
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务

    修改前:
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务
    修改后:
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务

  3. 再进入到nacos的bin目录下,打开cmd窗口,使用 startup.cmd -m standalone 命令,以单机模式运行,成功!在浏览器中输入 localhost:8848/nacos进行登录,用户名和密码都是nacos
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务
    Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:,微服务,spring,springcloud,微服务文章来源地址https://www.toymoban.com/news/detail-593223.html

到了这里,关于Nacos 2.2.0.1启动服务失败, 提示Error creating bean with name ‘user‘:的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 报错org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name...

    刚学SpringBoot,今天启动的时候报错了,长长的一堆报错信息 报错信息大概说的是创建UserController bean出现错误 下面又说创建UserService bean出现错误和UserMapper也出错 于是我百度了一下,都说没加注解,我检查了一下,改加的都加了呀 于是我又分别测试了一下mapper和service 又说报

    2024年02月04日
    浏览(48)
  • Error creating bean with name ‘esUtils‘ defined in file

     报错异常:  背景: esUtils在common服务中、启动media服务时候、报这个异常、后排查esUtils在启动时候发生异常引起的、在相关bean中加入try{}catch{}即可解决问题

    2024年02月11日
    浏览(49)
  • UnsatisfiedDependencyException: Error creating bean with name ‘subjectServiceImpl‘: Unsatisfied depe

    看xml所在的路径不舒服(任性改资源路径) 以为idea会帮我更新引用就以身试险了哈哈哈 报错信息是bean出现了创建错误 查了网上大部分的博客,一一排除后还是报错 网上大部分建议总结如下: 1:先去排查service实现层有没有添加注解@service 2:检查接口有没有对应的实现类,可能实

    2023年04月24日
    浏览(28)
  • [报错解决](Error Creating bean with name ‘xxx‘)类问题解决思路

    遇到Error Creating bean with name ’ \\\'这类问题的解决思路 错误日志关键部分: 大意如下:不满足依赖异常。创建名为’xxxMapper’的bean时出错:通过字段’sqlSessionFactory’表达的不满足的依赖项; spring配置文件中检查包是否扫描,仔细检查自己的配置文件里和相关的配置路径。 在项

    2023年04月08日
    浏览(28)
  • springboot报错Error creating bean with name ‘dataSource‘的解决方案

    问题描述: 在学习到黑马的学成在线微服务项目时,运行内容模块的服务时报错如下: 报错异常分析: Spring应用程序中名为“dataSource”的bean的依赖项注入存在问题。具体问题在于“dataSource”bean的“basicProperties”字段。此字段有一个未满足的依赖项。 嵌套异常进一步解释

    2024年02月11日
    浏览(34)
  • springboot与springcloud版本关系,BeanCreationException: Error creating bean with name

    添加注解@EnableFeignClients后报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name \\\'configurationPropertiesBeans\\\' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is

    2024年02月05日
    浏览(30)
  • 解决Error creating bean with name ‘XXXX‘ defined in URL

    遇到了一个神奇的bug,在开发环境能好好运行的jar,到生产环境启动的时候报Error creating bean with name \\\'XXXX\\\' defined in URL的异常,并且每次都是报的同一个类找不到,试了各种方法都没能解决,网上也找了很多资料基本无用,异常如下。 经过多次猜测和尝试,终于发现原因。原来是由

    2024年02月12日
    浏览(39)
  • Java报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXX‘:

    在运行简单的spring-boot框架程序的时候,遇到了一个错误org.springframework.beans.factory.BeanCreationException: Error creating bean with name \\\'XXX\\\': 起初就单纯的以为是自动装配出了问题,就没放在心上,就硬是运行,结果就是没有成功。 在检查了自动装配注解是否正确填写为@Autowired。​​​

    2024年02月14日
    浏览(39)
  • Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘s

            在练习一个springboot项目时,在执行时出现了下面的报错信息,找了好久都不知道怎么回事,因此,记录下整个过程,从而鞭策如菜鸡一样的自己。我的问题是打包问题(删除pom打包方式就可以了) 目  录 前言 1、报错问题 2、解决过程 3、解决方式 4、总结 Cause

    2023年04月22日
    浏览(84)
  • Error creating bean with name ‘kafkaTemplate‘ defined in class path resource

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name \\\'org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration\\\': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.kafka.Kafka

    2024年02月07日
    浏览(45)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包