这两天刚刚接触springboot,跟着一位博主敲框架,结果他的一点问题没有,而我的却报错。第一反应肯定不是代码的问题,那就是环境配置的问题。果然,发现了问题如图
在我寻找大量的资料后找到了一个完全解决了我问题的方法。
就是在maven的conf目录下的setting.xml 文件中加上这样一段配置:
alimaven central aliyun maven https://maven.aliyun.com/nexus/content/repositories/central/ repo1 central Human Readable Name for this Mirror. http://repo1.maven.org/maven2/ repo2 central Human Readable Name for this Mirror. http://repo2.maven.org/maven2/如果你跟我一样加了之后错误还是没有解决,那么就在pom.xml文件中加上:
central http://host:port/content/groups/public central http://host:port/content/groups/public就这样,我的问题解决了!