IDEA

设置Maven国内阿里镜像

  1. 右键项目,选择Maven→Open ‘settings.xml’

image-20230626133235011

  1. 在settings.xml文件中增加阿里云镜像地址,代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<mirrors>
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>

</mirrors>
</settings>
  1. 在pom.xml文件上右击,选择Maven→Reimport

image-20230626133344412

tips

  1. maven 的的全局配置默认路径是C:\Users[当前用户].m2\settings.xml
  2. maven的配置路径可以在settings中的maven中修改

VScode

导入设置

管理→设置→打开设置

{
"files.autoSave": "afterDelay",
"files.autoGuessEncoding": true,
"workbench.list.smoothScrolling": true,
"editor.cursorSmoothCaretAnimation": "on",
"editor.smoothScrolling": true,
"editor.cursorBlinking": "smooth",
"editor.mouseWheelZoom": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.wordWrap": "on",
"editor.guides.bracketPairs": true,
//"editor.bracketPairColorization.enabled": true, (此设置vscode在较新版本已默认开启)
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.acceptSuggestionOnEnter": "smart",
"editor.suggestSelection": "recentlyUsed",
"window.dialogStyle": "custom",
"debug.showBreakpointsInOverviewRuler": true,
"editor.fontSize": 18,
"liveServer.settings.donotShowInfoMsg": true,
"workbench.iconTheme": "vscode-icons",
"explorer.confirmDelete": false,
"workbench.startupEditor": "none",
}