配置maven仓库Maven – Download Apache Maven官网
在https://archive.apache.org/dist/maven/下载相对应版本
全版本3历史版本Index of /dist/maven/maven-3
修改配置文件
1.
2.阿里的远程中央仓库
项目使用的maven home(主路径)
IDEA的maven配置
每次创建新的项目需要重新配置maven路径
注意:如果出现依赖无法更新等问题Work offine取消打勾
maven仓库全局配置
建议配置全局,避免每次因默认路径而重新在原仓库下载依赖
暴力解决maven导入依赖爆红问题
遇过依赖版本不对、本地或idea自带的maven没有这个依赖
直接在POM最后加这段
<repositories>
<repository>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
中文乱码问题
直接设置
第二种:
-Dfile.encoding=UTF-8
粘贴上去
点击右上角下拉菜单第一个选项Edit Configurations,进入运行调试配置,找到对应的tomcat或者是application将VM options中添加上
-Dfile.encoding=UTF-8
第三步(关闭idea,重新打开即可)
JDK配置--IDEA没有配置好
如果没有正确输出或不能执行 应该先检查一下JDK是否安装或路径是否正确!
设置JDK路径可以按下:ctrl+alt+shift+s来开启Project Structure设置面板!