今天看了下书翻了下Spring Boot的用法,下载idea后, 反复出现'org.springframework.boot:spring-boot-maven-plugin:找不到类错误,后来看了下调试窗口,发现是连不上maven的网站443错误,解决思路很简单,把ide连到阿里云镜像那里就行。不过最后Maven还是不成功,只能用gradle来
1、先下载maven
网站Maven -- Welcome to Apache Maven
2、修改里面的settings.xml

加入以下文字即可
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/\</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

3、把文件移动到对应目录

4、重新新建程序
运行失败

在项目pom.xml加入
<defaultGoal>compile</defaultGoal>即可

成功构建

打开target文件夹

里面没有jar包,说明有问题
没办法,只能老老实实把环境变量加上,用cmd的mvn命令打包mvn clean package


有反应


最后显示gradle的成功的截图

