Spring boot未知错误与MongoDB修改密码

一、spring boot不知道什么原因启动报错(导入eclipse中出现pom.xml报错)
Description Resource Path Location Type Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from http://repo1.maven.org/maven2was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from/to central (http://repo1.maven.org/maven2): No response received after 60000 ExampleProject Unknown Maven Problem
1. cmd进入命令行
2. cd %userprofile%.m2\repository
3. for /r %i in (*.lastUpdated) do del %i
4.然后在eclipse 右键项目–>Maven–>Update Project–>force update(勾选) 然后点击确定
二、MongoDB修改密码
1.首先进入mongoDB安装目录
2.cmd打开,cd 到MongoDB安装bin目录下,然后进行mongo.exe回车
这里写图片描述
3.输入命令 use admin
4.然后再输入

db.createUser(
   {
     user: "appAdmin",
     pwd: "password",
     roles:
       [
         { role: "readWrite", db: "config" },
         "clusterAdmin"
       ]
   }
)

appAdmin:用户名
password:密码
这里写图片描述
然后用可视化工具进行登录,测试http://127.0.0.1:27017在浏览器输入就可以
出现这样的语句就ok

It looks like you are trying to access MongoDB over HTTP on the native driver port.

猜你喜欢

转载自blog.csdn.net/qq_32447301/article/details/81322503