赞
踩
Caused by: 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 http://xxx....
Caused by: java.lang.IllegalArgumentException:
The specified key byte array is x bits which is not secure enough for any JWT HMAC-SHA algorithm.
The JWT JWA Specification (RFC 7518, Section 3.2) states that keys used with HMAC-SHA algorithms MUST have a size >= 256 bits (the key size must be greater than or equal to the hash output size).
很明显,报错原因是secret key参数 长度不够
打开nacos文件夹 -> conf -> application.properties
找到以下配置:
nacos.core.auth.plugin.nacos.token.secret.key=
在后面添加随机参数作为nacos的加密密钥,
规则是加密密钥长度 >=256 bits 或者 >= 32 bytes
我添加了50位英文、数字成功运行
startup.cmd -m standalone
成功点亮
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。