后端项目(maven依赖)
1.打开一个项目,打开pom.xml文件
2.在pom.xml文件中右键,找到maven -> create “settings.xml”如果已经有了这个文件则打开open “settings.xml”
3.将该文件的内容替换为如下内容,保存
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| <?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> <name>aliyun maven</name> <url>https://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
<mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>https://uk.maven.org/maven2/</url> </mirror>
<mirror> <id>CN</id> <name>OSChina Central</name> <url>https://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
<mirror> <id>nexus</id> <name>internal nexus repository</name> <url>https://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror>
</mirrors> </settings>
|
4.idea启动加速
需要配置vmoptions文件,此文件在idea的安装目录中,参考如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| -Xms1g -Xmx2g -XX:ReservedCodeCacheSize=1g -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 -Xverify:none -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Dide.no.platform.update=true -Djdk.attach.allowAttachSelf=true
|
前端项目(npm)
1.首先替换npm的源为阿里的源
1
| npm config set registry https:
|
2.查看是否替换成功