From e320f8052c3963f57cc0897a01e527a1fec96abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 25 Dec 2024 14:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20Java=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20=E6=8F=8F=E8=BF=B0=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/other.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/doc/other.md b/doc/other.md index 71f739cb..02a95c3c 100644 --- a/doc/other.md +++ b/doc/other.md @@ -3,16 +3,25 @@ ## Java程序使用 > 由 [Enaium](https://github.com/Enaium) 提供,未做验证,可供参考 -> -> 需要先通过keytool安装证书 -> `keytool -import -alias dev-sidecar -keystore "jdk路径\security\cacerts" -file 用户目录\.dev-sidecar\dev-sidecar.ca.crt`默认密码为`changeit` -> 启动时还需要设置参数 -> `-Dhttp.proxyHost=localhost -Dhttp.proxyPort=31181 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=31181` -> Gradle还需在`用户目录/.gradle/gradle.properties`创建配置文件 -```properties -systemProp.http.proxyHost=localhost -systemProp.http.proxyPort=31181 -systemProp.https.proxyHost=localhost -systemProp.https.proxyPort=31181 -``` +1. 先通过keytool安装证书: + + ```shell + keytool -import -alias dev-sidecar -keystore "jdk路径\security\cacerts" -file 用户目录\.dev-sidecar\dev-sidecar.ca.crt + ``` + 默认密码为 `changeit` + +2. 启动时还需要设置参数,例: + + ```shell + java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=31181 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=31181 -jar xxxx.jar + ``` + +3. Gradle还需在`用户目录/.gradle/gradle.properties`创建配置文件: + + ```properties + systemProp.http.proxyHost=localhost + systemProp.http.proxyPort=31181 + systemProp.https.proxyHost=localhost + systemProp.https.proxyPort=31181 + ```