init mongoClient Exception The connection string contains invalid user information. If the username or password contains a colon (:) or an at-sign (@) then it must be urlencoded

如题:初始化mongodb连接异常,连接字符串包含无效的用户信息。如果用户名或密码包含冒号(:)或at符号(@),则必须对其进行URL编码

这里需要对特殊符号冒号:或at符号@进行转码处理,因为这个链接里面本来就有这两符号用于区分位置。urlencode转码或16进制的转码都可以,因为我用的就是16进制转码。

一看我的密码里面确实有个@符号,赶紧替换成%40,一启动还是报这错!

重点:把数字、字母以外的其他符号全部转码,再启动就OK了。

springboot-data-mongodb,这个错误提示应该是:If the username or password contains special characters then it must be urlencoded 

 

posted @ 2021-09-24 15:50  别动我的猫  阅读(552)  评论(1编辑  收藏  举报