Vite加速 maven修改 settings.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
<?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> aliyunmaven</id>
<mirrorOf> *</mirrorOf>
<name> alicloud</name>
<url> https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
</settings>
gradle修改 build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/public' }
}
dependencies {
// ...
}
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/public' }
}
}
gradle of SpringBoot 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
36
37
38
39
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral ()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks . named ( 'test' ) {
useJUnitPlatform ()
}
pip aliyun1
2
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
tsinghua1
2
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn
yarn 设置1
yarn config set registry 'https://registry.npmmirror.com'
撤销1
yarn config set registry https://registry.yarnpkg.com
删除1
yarn config delete registry
pnpm / npmpnpm和npm会共用一个地址, 所以设置一个即可
1
pnpm config set registry https://registry.npmmirror.com
golanggolang推荐直接修改环境变量 goproxy
powershell1
setx GOPROXY "https://goproxy.cn,direct"
linux在linux中推荐 .bashrc中写入如下命令
1
export GOPROXY = "https://goproxy.cn,direct"
bash/cmd/pwsh这种方式会被环境变量覆盖, 优先级不高,不如以上命令
1
go env -w https://goproxy.cn,direct
git1
git clone --config "http.proxy='http://127.0.0.1:{port}'" --depth= 1 ...
set proxy of cli一般来说, 程序都会读取环境变量中 "http_proxy"和"https_proxy"作为代理服务器
powershell cmd1
2
set https_proxy = ""
# read echo %https_proxy%
bash pnpm1
pnpm config set https-proxy ""
Alpine1
2
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
Any Mirrors Aliyunhttps://developer.aliyun.com/mirror/
Tsinghuahttps://mirrors.tuna.tsinghua.edu.cn/
Tencenthttps://mirrors.tencent.com/